Commit b68c8736 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Michal Simek

microblaze: Remove support for gcc < 4

Since commit cafa0010 ("Raise the minimum required gcc version
to 4.6") , the kernel can no longer be compiled using gcc-3.
Hence drop support code for gcc-3.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20210210141140.1506212-5-geert+renesas@glider.beSigned-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 57ddf086
...@@ -24,9 +24,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, ...@@ -24,9 +24,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
Elf32_Sym *sym; Elf32_Sym *sym;
unsigned long int *location; unsigned long int *location;
unsigned long int value; unsigned long int value;
#if __GNUC__ < 4
unsigned long int old_value;
#endif
pr_debug("Applying add relocation section %u to %u\n", pr_debug("Applying add relocation section %u to %u\n",
relsec, sechdrs[relsec].sh_info); relsec, sechdrs[relsec].sh_info);
...@@ -49,40 +46,17 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, ...@@ -49,40 +46,17 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
*/ */
case R_MICROBLAZE_32: case R_MICROBLAZE_32:
#if __GNUC__ < 4
old_value = *location;
*location = value + old_value;
pr_debug("R_MICROBLAZE_32 (%08lx->%08lx)\n",
old_value, value);
#else
*location = value; *location = value;
#endif
break; break;
case R_MICROBLAZE_64: case R_MICROBLAZE_64:
#if __GNUC__ < 4
/* Split relocs only required/used pre gcc4.1.1 */
old_value = ((location[0] & 0x0000FFFF) << 16) |
(location[1] & 0x0000FFFF);
value += old_value;
#endif
location[0] = (location[0] & 0xFFFF0000) | location[0] = (location[0] & 0xFFFF0000) |
(value >> 16); (value >> 16);
location[1] = (location[1] & 0xFFFF0000) | location[1] = (location[1] & 0xFFFF0000) |
(value & 0xFFFF); (value & 0xFFFF);
#if __GNUC__ < 4
pr_debug("R_MICROBLAZE_64 (%08lx->%08lx)\n",
old_value, value);
#endif
break; break;
case R_MICROBLAZE_64_PCREL: case R_MICROBLAZE_64_PCREL:
#if __GNUC__ < 4
old_value = (location[0] & 0xFFFF) << 16 |
(location[1] & 0xFFFF);
value -= old_value;
#endif
value -= (unsigned long int)(location) + 4; value -= (unsigned long int)(location) + 4;
location[0] = (location[0] & 0xFFFF0000) | location[0] = (location[0] & 0xFFFF0000) |
(value >> 16); (value >> 16);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment