bfd/ELF: fold BFD_RELOC_<arch>_GOTOFF*

For many of the cases there's no need to have separate relocs per arch;
just like for other more or less generic ones a single one (per purpose;
a 64-bit generic one is being introduced) will do. Arm64, C-Sky, and
KVX - sadly - continue to be exceptions.
This commit is contained in:
Jan Beulich 2026-04-09 08:36:19 +02:00
parent 433917ca0a
commit 705b90feb8
24 changed files with 67 additions and 142 deletions

View file

@ -3359,6 +3359,7 @@ enum bfd_reloc_code_real
BFD_RELOC_32_GOT_PCREL,
BFD_RELOC_16_GOT_PCREL,
BFD_RELOC_8_GOT_PCREL,
BFD_RELOC_64_GOTOFF,
BFD_RELOC_32_GOTOFF,
BFD_RELOC_16_GOTOFF,
BFD_RELOC_LO16_GOTOFF,
@ -3813,8 +3814,6 @@ enum bfd_reloc_code_real
BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
BFD_RELOC_FRV_GOTOFF12,
BFD_RELOC_FRV_GOTOFFHI,
BFD_RELOC_FRV_GOTOFFLO,
BFD_RELOC_FRV_GETTLSOFF,
BFD_RELOC_FRV_TLSDESC_VALUE,
BFD_RELOC_FRV_GOTTLSDESC12,
@ -3870,7 +3869,6 @@ enum bfd_reloc_code_real
/* i386/elf relocations. */
BFD_RELOC_386_GOT32,
BFD_RELOC_386_PLT32,
BFD_RELOC_386_GOTOFF,
BFD_RELOC_386_GOTPC,
BFD_RELOC_386_TLS_TPOFF,
BFD_RELOC_386_TLS_IE,
@ -3901,7 +3899,6 @@ enum bfd_reloc_code_real
BFD_RELOC_X86_64_DTPOFF32,
BFD_RELOC_X86_64_GOTTPOFF,
BFD_RELOC_X86_64_TPOFF32,
BFD_RELOC_X86_64_GOTOFF64,
BFD_RELOC_X86_64_GOTPC32,
BFD_RELOC_X86_64_GOT64,
BFD_RELOC_X86_64_GOTPCREL64,
@ -4218,7 +4215,6 @@ enum bfd_reloc_code_real
/* Relocations for setting up GOTs and PLTs for shared libraries. */
BFD_RELOC_ARM_GOT32,
BFD_RELOC_ARM_GOTOFF,
BFD_RELOC_ARM_GOTPC,
BFD_RELOC_ARM_GOT_PREL,
@ -4405,7 +4401,6 @@ enum bfd_reloc_code_real
BFD_RELOC_ARC_32_PCREL,
BFD_RELOC_ARC_GOT32,
BFD_RELOC_ARC_GOTPC32,
BFD_RELOC_ARC_GOTOFF,
BFD_RELOC_ARC_GOTPC,
BFD_RELOC_ARC_S21W_PCREL_PLT,
BFD_RELOC_ARC_S25H_PCREL_PLT,
@ -4470,8 +4465,6 @@ enum bfd_reloc_code_real
BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
BFD_RELOC_BFIN_GOTOFF17M4,
BFD_RELOC_BFIN_GOTOFFHI,
BFD_RELOC_BFIN_GOTOFFLO,
/* ADI Blackfin GOT relocation. */
BFD_RELOC_BFIN_GOT,
@ -4644,9 +4637,6 @@ enum bfd_reloc_code_real
BFD_RELOC_M32R_GOT24,
BFD_RELOC_M32R_26_PLTREL,
BFD_RELOC_M32R_GOTOFF,
BFD_RELOC_M32R_GOTOFF_HI_ULO,
BFD_RELOC_M32R_GOTOFF_HI_SLO,
BFD_RELOC_M32R_GOTOFF_LO,
BFD_RELOC_M32R_GOTPC24,
BFD_RELOC_M32R_GOT16_HI_ULO,
BFD_RELOC_M32R_GOT16_HI_SLO,
@ -4972,8 +4962,6 @@ enum bfd_reloc_code_real
BFD_RELOC_V850_32_GOT,
BFD_RELOC_V850_22_PLT_PCREL,
BFD_RELOC_V850_32_PLT_PCREL,
BFD_RELOC_V850_16_GOTOFF,
BFD_RELOC_V850_32_GOTOFF,
/* Start code. */
BFD_RELOC_V850_CODE,
@ -5107,8 +5095,6 @@ enum bfd_reloc_code_real
BFD_RELOC_METAG_LOOG,
BFD_RELOC_METAG_REL8,
BFD_RELOC_METAG_REL16,
BFD_RELOC_METAG_HI16_GOTOFF,
BFD_RELOC_METAG_LO16_GOTOFF,
BFD_RELOC_METAG_GETSET_GOTOFF,
BFD_RELOC_METAG_GETSET_GOT,
BFD_RELOC_METAG_HI16_GOTPC,
@ -5116,7 +5102,6 @@ enum bfd_reloc_code_real
BFD_RELOC_METAG_HI16_PLT,
BFD_RELOC_METAG_LO16_PLT,
BFD_RELOC_METAG_RELBRANCH_PLT,
BFD_RELOC_METAG_GOTOFF,
BFD_RELOC_METAG_PLT,
BFD_RELOC_METAG_TLS_GD,
BFD_RELOC_METAG_TLS_LDM,
@ -5480,9 +5465,6 @@ enum bfd_reloc_code_real
/* 32 bit rel. offset to GOT entry. */
BFD_RELOC_390_GOTENT,
/* 64 bit offset to GOT. */
BFD_RELOC_390_GOTOFF64,
/* 12-bit offset to symbol-entry within GOT, with PLT handling. */
BFD_RELOC_390_GOTPLT12,
@ -6205,8 +6187,6 @@ enum bfd_reloc_code_real
BFD_RELOC_LM32_CALL,
BFD_RELOC_LM32_BRANCH,
BFD_RELOC_LM32_16_GOT,
BFD_RELOC_LM32_GOTOFF_HI16,
BFD_RELOC_LM32_GOTOFF_LO16,
/* Difference between two section addreses. Must be followed by a
BFD_RELOC_MACH_O_PAIR. */

View file

@ -385,6 +385,7 @@ arc_elf_link_hash_table_create (bfd *abfd)
#define BFD_RELOC_ARC_32 BFD_RELOC_32
#define BFD_RELOC_ARC_PC32 BFD_RELOC_32_PCREL
#define BFD_RELOC_ARC_PLT32 BFD_RELOC_32_PLT_PCREL
#define BFD_RELOC_ARC_GOTOFF BFD_RELOC_32_GOTOFF
#define BFD_RELOC_ARC_COPY BFD_RELOC_COPY
#define BFD_RELOC_ARC_GLOB_DAT BFD_RELOC_GLOB_DAT
#define BFD_RELOC_ARC_JMP_SLOT BFD_RELOC_JMP_SLOT

View file

@ -2019,7 +2019,7 @@ static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
{BFD_RELOC_GLOB_DAT, R_ARM_GLOB_DAT},
{BFD_RELOC_JMP_SLOT, R_ARM_JUMP_SLOT},
{BFD_RELOC_RELATIVE, R_ARM_RELATIVE},
{BFD_RELOC_ARM_GOTOFF, R_ARM_GOTOFF32},
{BFD_RELOC_32_GOTOFF, R_ARM_GOTOFF32},
{BFD_RELOC_ARM_GOTPC, R_ARM_GOTPC},
{BFD_RELOC_ARM_GOT_PREL, R_ARM_GOT_PREL},
{BFD_RELOC_ARM_GOT32, R_ARM_GOT32},

View file

@ -1034,8 +1034,8 @@ static const struct bfin_reloc_map bfin_reloc_map [] =
{ BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI, R_BFIN_FUNCDESC_GOTOFFHI },
{ BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, R_BFIN_FUNCDESC_GOTOFFLO },
{ BFD_RELOC_BFIN_GOTOFF17M4, R_BFIN_GOTOFF17M4 },
{ BFD_RELOC_BFIN_GOTOFFHI, R_BFIN_GOTOFFHI },
{ BFD_RELOC_BFIN_GOTOFFLO, R_BFIN_GOTOFFLO },
{ BFD_RELOC_HI16_GOTOFF, R_BFIN_GOTOFFHI },
{ BFD_RELOC_LO16_GOTOFF, R_BFIN_GOTOFFLO },
{ BFD_RELOC_VTABLE_INHERIT, R_BFIN_GNU_VTINHERIT },
{ BFD_RELOC_VTABLE_ENTRY, R_BFIN_GNU_VTENTRY },

View file

@ -2441,10 +2441,10 @@ frv_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
case BFD_RELOC_FRV_GOTOFF12:
return &elf32_frv_howto_table[ (int) R_FRV_GOTOFF12];
case BFD_RELOC_FRV_GOTOFFHI:
case BFD_RELOC_HI16_GOTOFF:
return &elf32_frv_howto_table[ (int) R_FRV_GOTOFFHI];
case BFD_RELOC_FRV_GOTOFFLO:
case BFD_RELOC_LO16_GOTOFF:
return &elf32_frv_howto_table[ (int) R_FRV_GOTOFFLO];
case BFD_RELOC_FRV_GETTLSOFF:

View file

@ -233,8 +233,8 @@ elf_i386_reloc_type_lookup (bfd *abfd,
TRACE ("BFD_RELOC_RELATIVE");
return &elf_howto_table[R_386_RELATIVE];
case BFD_RELOC_386_GOTOFF:
TRACE ("BFD_RELOC_386_GOTOFF");
case BFD_RELOC_32_GOTOFF:
TRACE ("BFD_RELOC_32_GOTOFF");
return &elf_howto_table[R_386_GOTOFF];
case BFD_RELOC_386_GOTPC:

View file

@ -442,8 +442,8 @@ static const struct lm32_reloc_map lm32_reloc_map[] =
{ BFD_RELOC_VTABLE_INHERIT, R_LM32_GNU_VTINHERIT },
{ BFD_RELOC_VTABLE_ENTRY, R_LM32_GNU_VTENTRY },
{ BFD_RELOC_LM32_16_GOT, R_LM32_16_GOT },
{ BFD_RELOC_LM32_GOTOFF_HI16, R_LM32_GOTOFF_HI16 },
{ BFD_RELOC_LM32_GOTOFF_LO16, R_LM32_GOTOFF_LO16 },
{ BFD_RELOC_HI16_GOTOFF, R_LM32_GOTOFF_HI16 },
{ BFD_RELOC_LO16_GOTOFF, R_LM32_GOTOFF_LO16 },
{ BFD_RELOC_COPY, R_LM32_COPY },
{ BFD_RELOC_GLOB_DAT, R_LM32_GLOB_DAT },
{ BFD_RELOC_JMP_SLOT, R_LM32_JMP_SLOT },

View file

@ -1271,9 +1271,9 @@ static const struct m32r_reloc_map m32r_reloc_map[] =
{ BFD_RELOC_M32R_GOTPC_HI_ULO, R_M32R_GOTPC_HI_ULO },
{ BFD_RELOC_M32R_GOTPC_HI_SLO, R_M32R_GOTPC_HI_SLO },
{ BFD_RELOC_M32R_GOTPC_LO, R_M32R_GOTPC_LO },
{ BFD_RELOC_M32R_GOTOFF_HI_ULO, R_M32R_GOTOFF_HI_ULO },
{ BFD_RELOC_M32R_GOTOFF_HI_SLO, R_M32R_GOTOFF_HI_SLO },
{ BFD_RELOC_M32R_GOTOFF_LO, R_M32R_GOTOFF_LO },
{ BFD_RELOC_HI16_GOTOFF, R_M32R_GOTOFF_HI_ULO },
{ BFD_RELOC_HI16_S_GOTOFF, R_M32R_GOTOFF_HI_SLO },
{ BFD_RELOC_LO16_GOTOFF, R_M32R_GOTOFF_LO },
};
#endif

View file

@ -709,8 +709,8 @@ static const struct metag_reloc_map metag_reloc_map [] =
{ BFD_RELOC_VTABLE_ENTRY, R_METAG_GNU_VTENTRY },
{ BFD_RELOC_METAG_REL8, R_METAG_REL8 },
{ BFD_RELOC_METAG_REL16, R_METAG_REL16 },
{ BFD_RELOC_METAG_HI16_GOTOFF, R_METAG_HI16_GOTOFF },
{ BFD_RELOC_METAG_LO16_GOTOFF, R_METAG_LO16_GOTOFF },
{ BFD_RELOC_HI16_GOTOFF, R_METAG_HI16_GOTOFF },
{ BFD_RELOC_LO16_GOTOFF, R_METAG_LO16_GOTOFF },
{ BFD_RELOC_METAG_GETSET_GOTOFF, R_METAG_GETSET_GOTOFF },
{ BFD_RELOC_METAG_GETSET_GOT, R_METAG_GETSET_GOT },
{ BFD_RELOC_METAG_HI16_GOTPC, R_METAG_HI16_GOTPC },
@ -718,7 +718,7 @@ static const struct metag_reloc_map metag_reloc_map [] =
{ BFD_RELOC_METAG_HI16_PLT, R_METAG_HI16_PLT },
{ BFD_RELOC_METAG_LO16_PLT, R_METAG_LO16_PLT },
{ BFD_RELOC_METAG_RELBRANCH_PLT, R_METAG_RELBRANCH_PLT },
{ BFD_RELOC_METAG_GOTOFF, R_METAG_GOTOFF },
{ BFD_RELOC_32_GOTOFF, R_METAG_GOTOFF },
{ BFD_RELOC_METAG_PLT, R_METAG_PLT },
{ BFD_RELOC_COPY, R_METAG_COPY },
{ BFD_RELOC_JMP_SLOT, R_METAG_JMP_SLOT },

View file

@ -1740,8 +1740,8 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] =
{ BFD_RELOC_GLOB_DAT, R_V850_GLOB_DAT },
{ BFD_RELOC_JMP_SLOT, R_V850_JMP_SLOT },
{ BFD_RELOC_RELATIVE, R_V850_RELATIVE },
{ BFD_RELOC_V850_16_GOTOFF, R_V850_16_GOTOFF },
{ BFD_RELOC_V850_32_GOTOFF, R_V850_32_GOTOFF },
{ BFD_RELOC_16_GOTOFF, R_V850_16_GOTOFF },
{ BFD_RELOC_32_GOTOFF, R_V850_32_GOTOFF },
{ BFD_RELOC_V850_CODE, R_V850_CODE },
{ BFD_RELOC_V850_DATA, R_V850_DATA },
};

View file

@ -263,7 +263,7 @@ elf_s390_reloc_type_lookup (bfd *abfd,
return &elf_howto_table[(int) R_390_GOTENT];
case BFD_RELOC_16_GOTOFF:
return &elf_howto_table[(int) R_390_GOTOFF16];
case BFD_RELOC_390_GOTOFF64:
case BFD_RELOC_64_GOTOFF:
return &elf_howto_table[(int) R_390_GOTOFF64];
case BFD_RELOC_390_GOTPLT12:
return &elf_howto_table[(int) R_390_GOTPLT12];

View file

@ -255,7 +255,7 @@ static const struct elf_reloc_map x86_64_reloc_map[] =
{ BFD_RELOC_X86_64_GOTTPOFF, R_X86_64_GOTTPOFF, },
{ BFD_RELOC_X86_64_TPOFF32, R_X86_64_TPOFF32, },
{ BFD_RELOC_64_PCREL, R_X86_64_PC64, },
{ BFD_RELOC_X86_64_GOTOFF64, R_X86_64_GOTOFF64, },
{ BFD_RELOC_64_GOTOFF, R_X86_64_GOTOFF64, },
{ BFD_RELOC_X86_64_GOTPC32, R_X86_64_GOTPC32, },
{ BFD_RELOC_X86_64_GOT64, R_X86_64_GOT64, },
{ BFD_RELOC_X86_64_GOTPCREL64,R_X86_64_GOTPCREL64, },

View file

@ -1117,6 +1117,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_32_GOT_PCREL",
"BFD_RELOC_16_GOT_PCREL",
"BFD_RELOC_8_GOT_PCREL",
"BFD_RELOC_64_GOTOFF",
"BFD_RELOC_32_GOTOFF",
"BFD_RELOC_16_GOTOFF",
"BFD_RELOC_LO16_GOTOFF",
@ -1409,8 +1410,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_FRV_FUNCDESC_GOTOFFHI",
"BFD_RELOC_FRV_FUNCDESC_GOTOFFLO",
"BFD_RELOC_FRV_GOTOFF12",
"BFD_RELOC_FRV_GOTOFFHI",
"BFD_RELOC_FRV_GOTOFFLO",
"BFD_RELOC_FRV_GETTLSOFF",
"BFD_RELOC_FRV_TLSDESC_VALUE",
"BFD_RELOC_FRV_GOTTLSDESC12",
@ -1444,7 +1443,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MN10300_TLS_TPOFF",
"BFD_RELOC_386_GOT32",
"BFD_RELOC_386_PLT32",
"BFD_RELOC_386_GOTOFF",
"BFD_RELOC_386_GOTPC",
"BFD_RELOC_386_TLS_TPOFF",
"BFD_RELOC_386_TLS_IE",
@ -1473,7 +1471,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_X86_64_DTPOFF32",
"BFD_RELOC_X86_64_GOTTPOFF",
"BFD_RELOC_X86_64_TPOFF32",
"BFD_RELOC_X86_64_GOTOFF64",
"BFD_RELOC_X86_64_GOTPC32",
"BFD_RELOC_X86_64_GOT64",
"BFD_RELOC_X86_64_GOTPCREL64",
@ -1719,7 +1716,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_TLS_LDM32_FDPIC",
"BFD_RELOC_ARM_TLS_IE32_FDPIC",
"BFD_RELOC_ARM_GOT32",
"BFD_RELOC_ARM_GOTOFF",
"BFD_RELOC_ARM_GOTPC",
"BFD_RELOC_ARM_GOT_PREL",
"BFD_RELOC_ARM_TLS_GD32",
@ -1891,7 +1887,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARC_32_PCREL",
"BFD_RELOC_ARC_GOT32",
"BFD_RELOC_ARC_GOTPC32",
"BFD_RELOC_ARC_GOTOFF",
"BFD_RELOC_ARC_GOTPC",
"BFD_RELOC_ARC_S21W_PCREL_PLT",
"BFD_RELOC_ARC_S25H_PCREL_PLT",
@ -1932,8 +1927,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI",
"BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO",
"BFD_RELOC_BFIN_GOTOFF17M4",
"BFD_RELOC_BFIN_GOTOFFHI",
"BFD_RELOC_BFIN_GOTOFFLO",
"BFD_RELOC_BFIN_GOT",
"BFD_RELOC_BFIN_PLTPC",
"BFD_ARELOC_BFIN_PUSH",
@ -1989,9 +1982,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_M32R_GOT24",
"BFD_RELOC_M32R_26_PLTREL",
"BFD_RELOC_M32R_GOTOFF",
"BFD_RELOC_M32R_GOTOFF_HI_ULO",
"BFD_RELOC_M32R_GOTOFF_HI_SLO",
"BFD_RELOC_M32R_GOTOFF_LO",
"BFD_RELOC_M32R_GOTPC24",
"BFD_RELOC_M32R_GOT16_HI_ULO",
"BFD_RELOC_M32R_GOT16_HI_SLO",
@ -2160,8 +2150,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_V850_32_GOT",
"BFD_RELOC_V850_22_PLT_PCREL",
"BFD_RELOC_V850_32_PLT_PCREL",
"BFD_RELOC_V850_16_GOTOFF",
"BFD_RELOC_V850_32_GOTOFF",
"BFD_RELOC_V850_CODE",
"BFD_RELOC_V850_DATA",
"BFD_RELOC_TIC30_LDP",
@ -2238,8 +2226,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_METAG_LOOG",
"BFD_RELOC_METAG_REL8",
"BFD_RELOC_METAG_REL16",
"BFD_RELOC_METAG_HI16_GOTOFF",
"BFD_RELOC_METAG_LO16_GOTOFF",
"BFD_RELOC_METAG_GETSET_GOTOFF",
"BFD_RELOC_METAG_GETSET_GOT",
"BFD_RELOC_METAG_HI16_GOTPC",
@ -2247,7 +2233,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_METAG_HI16_PLT",
"BFD_RELOC_METAG_LO16_PLT",
"BFD_RELOC_METAG_RELBRANCH_PLT",
"BFD_RELOC_METAG_GOTOFF",
"BFD_RELOC_METAG_PLT",
"BFD_RELOC_METAG_TLS_GD",
"BFD_RELOC_METAG_TLS_LDM",
@ -2445,7 +2430,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_390_GOTPCDBL",
"BFD_RELOC_390_GOT64",
"BFD_RELOC_390_GOTENT",
"BFD_RELOC_390_GOTOFF64",
"BFD_RELOC_390_GOTPLT12",
"BFD_RELOC_390_GOTPLT16",
"BFD_RELOC_390_GOTPLT32",
@ -2850,8 +2834,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_LM32_CALL",
"BFD_RELOC_LM32_BRANCH",
"BFD_RELOC_LM32_16_GOT",
"BFD_RELOC_LM32_GOTOFF_HI16",
"BFD_RELOC_LM32_GOTOFF_LO16",
"BFD_RELOC_MACH_O_SECTDIFF",
"BFD_RELOC_MACH_O_LOCAL_SECTDIFF",
"BFD_RELOC_MACH_O_PAIR",

View file

@ -1438,6 +1438,8 @@ ENUMX
BFD_RELOC_16_GOT_PCREL
ENUMX
BFD_RELOC_8_GOT_PCREL
ENUMX
BFD_RELOC_64_GOTOFF
ENUMX
BFD_RELOC_32_GOTOFF
ENUMX
@ -2231,10 +2233,6 @@ ENUMX
BFD_RELOC_FRV_FUNCDESC_GOTOFFLO
ENUMX
BFD_RELOC_FRV_GOTOFF12
ENUMX
BFD_RELOC_FRV_GOTOFFHI
ENUMX
BFD_RELOC_FRV_GOTOFFLO
ENUMX
BFD_RELOC_FRV_GETTLSOFF
ENUMX
@ -2325,8 +2323,6 @@ ENUM
BFD_RELOC_386_GOT32
ENUMX
BFD_RELOC_386_PLT32
ENUMX
BFD_RELOC_386_GOTOFF
ENUMX
BFD_RELOC_386_GOTPC
ENUMX
@ -2386,8 +2382,6 @@ ENUMX
BFD_RELOC_X86_64_GOTTPOFF
ENUMX
BFD_RELOC_X86_64_TPOFF32
ENUMX
BFD_RELOC_X86_64_GOTOFF64
ENUMX
BFD_RELOC_X86_64_GOTPC32
ENUMX
@ -2968,8 +2962,6 @@ ENUMDOC
ENUM
BFD_RELOC_ARM_GOT32
ENUMX
BFD_RELOC_ARM_GOTOFF
ENUMX
BFD_RELOC_ARM_GOTPC
ENUMX
@ -3334,8 +3326,6 @@ ENUMX
BFD_RELOC_ARC_GOT32
ENUMX
BFD_RELOC_ARC_GOTPC32
ENUMX
BFD_RELOC_ARC_GOTOFF
ENUMX
BFD_RELOC_ARC_GOTPC
ENUMX
@ -3441,10 +3431,6 @@ ENUMX
BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO
ENUMX
BFD_RELOC_BFIN_GOTOFF17M4
ENUMX
BFD_RELOC_BFIN_GOTOFFHI
ENUMX
BFD_RELOC_BFIN_GOTOFFLO
ENUMDOC
ADI Blackfin FD-PIC relocations.
ENUM
@ -3677,12 +3663,6 @@ ENUMX
BFD_RELOC_M32R_26_PLTREL
ENUMX
BFD_RELOC_M32R_GOTOFF
ENUMX
BFD_RELOC_M32R_GOTOFF_HI_ULO
ENUMX
BFD_RELOC_M32R_GOTOFF_HI_SLO
ENUMX
BFD_RELOC_M32R_GOTOFF_LO
ENUMX
BFD_RELOC_M32R_GOTPC24
ENUMX
@ -4181,10 +4161,6 @@ ENUMX
BFD_RELOC_V850_22_PLT_PCREL
ENUMX
BFD_RELOC_V850_32_PLT_PCREL
ENUMX
BFD_RELOC_V850_16_GOTOFF
ENUMX
BFD_RELOC_V850_32_GOTOFF
ENUMDOC
DSO relocations.
ENUM
@ -4405,10 +4381,6 @@ ENUMX
BFD_RELOC_METAG_REL8
ENUMX
BFD_RELOC_METAG_REL16
ENUMX
BFD_RELOC_METAG_HI16_GOTOFF
ENUMX
BFD_RELOC_METAG_LO16_GOTOFF
ENUMX
BFD_RELOC_METAG_GETSET_GOTOFF
ENUMX
@ -4423,8 +4395,6 @@ ENUMX
BFD_RELOC_METAG_LO16_PLT
ENUMX
BFD_RELOC_METAG_RELBRANCH_PLT
ENUMX
BFD_RELOC_METAG_GOTOFF
ENUMX
BFD_RELOC_METAG_PLT
ENUMX
@ -4992,10 +4962,6 @@ ENUM
BFD_RELOC_390_GOTENT
ENUMDOC
32 bit rel. offset to GOT entry.
ENUM
BFD_RELOC_390_GOTOFF64
ENUMDOC
64 bit offset to GOT.
ENUM
BFD_RELOC_390_GOTPLT12
ENUMDOC
@ -6144,10 +6110,6 @@ ENUMX
BFD_RELOC_LM32_BRANCH
ENUMX
BFD_RELOC_LM32_16_GOT
ENUMX
BFD_RELOC_LM32_GOTOFF_HI16
ENUMX
BFD_RELOC_LM32_GOTOFF_LO16
ENUMDOC
Lattice Mico32 relocations.

View file

@ -542,7 +542,7 @@ static const struct arc_reloc_op_tag
}
arc_reloc_op[] =
{
DEF (gotoff, BFD_RELOC_ARC_GOTOFF, 1),
DEF (gotoff, BFD_RELOC_32_GOTOFF, 1),
DEF (gotpc, BFD_RELOC_ARC_GOTPC32, 0),
DEF (plt, BFD_RELOC_32_PLT_PCREL, 0),
DEF (sda, DUMMY_RELOC_ARC_ENTRY, 1),
@ -3101,7 +3101,7 @@ md_apply_fix (fixS *fixP,
gas_assert (!fixP->fx_subsy);
/* Fall through. */
case BFD_RELOC_ARC_GOTOFF:
case BFD_RELOC_32_GOTOFF:
case BFD_RELOC_ARC_32_ME:
case BFD_RELOC_32_PCREL:
md_number_to_chars_midend (fixpos, value, fixP->fx_size);

View file

@ -23894,7 +23894,7 @@ static const struct asm_shift_name shift_names [] =
static struct reloc_entry reloc_names[] =
{
{ "got", BFD_RELOC_ARM_GOT32 }, { "GOT", BFD_RELOC_ARM_GOT32 },
{ "gotoff", BFD_RELOC_ARM_GOTOFF }, { "GOTOFF", BFD_RELOC_ARM_GOTOFF },
{ "gotoff", BFD_RELOC_32_GOTOFF }, { "GOTOFF", BFD_RELOC_32_GOTOFF },
{ "plt", BFD_RELOC_32_PLT_PCREL}, { "PLT", BFD_RELOC_32_PLT_PCREL},
{ "target1", BFD_RELOC_ARM_TARGET1 }, { "TARGET1", BFD_RELOC_ARM_TARGET1 },
{ "target2", BFD_RELOC_ARM_TARGET2 }, { "TARGET2", BFD_RELOC_ARM_TARGET2 },
@ -28458,7 +28458,7 @@ md_apply_fix (fixS * fixP,
break;
case BFD_RELOC_ARM_GOT32:
case BFD_RELOC_ARM_GOTOFF:
case BFD_RELOC_32_GOTOFF:
break;
case BFD_RELOC_ARM_GOT_PREL:
@ -29413,7 +29413,7 @@ tc_gen_reloc (asection *section, fixS *fixp)
case BFD_RELOC_ARM_TLS_DESCSEQ:
case BFD_RELOC_ARM_THM_TLS_DESCSEQ:
case BFD_RELOC_ARM_GOT32:
case BFD_RELOC_ARM_GOTOFF:
case BFD_RELOC_32_GOTOFF:
case BFD_RELOC_ARM_GOT_PREL:
case BFD_RELOC_32_PLT_PCREL:
case BFD_RELOC_ARM_TARGET1:
@ -29746,7 +29746,7 @@ arm_fix_adjustable (fixS * fixP)
/* Don't allow symbols to be discarded on GOT related relocs. */
if (fixP->fx_r_type == BFD_RELOC_32_PLT_PCREL
|| fixP->fx_r_type == BFD_RELOC_ARM_GOT32
|| fixP->fx_r_type == BFD_RELOC_ARM_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_32_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_ARM_TLS_GD32
|| fixP->fx_r_type == BFD_RELOC_ARM_TLS_GD32_FDPIC
|| fixP->fx_r_type == BFD_RELOC_ARM_TLS_LE32

View file

@ -1399,8 +1399,8 @@ frv_force_relocation (fixS *fix)
case BFD_RELOC_FRV_FUNCDESC_GOTOFFHI:
case BFD_RELOC_FRV_FUNCDESC_GOTOFFLO:
case BFD_RELOC_FRV_GOTOFF12:
case BFD_RELOC_FRV_GOTOFFHI:
case BFD_RELOC_FRV_GOTOFFLO:
case BFD_RELOC_HI16_GOTOFF:
case BFD_RELOC_LO16_GOTOFF:
case BFD_RELOC_FRV_GETTLSOFF:
case BFD_RELOC_FRV_TLSDESC_VALUE:
case BFD_RELOC_FRV_GOTTLSDESC12:
@ -1455,8 +1455,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
case BFD_RELOC_FRV_FUNCDESC_GOTOFFHI:
case BFD_RELOC_FRV_FUNCDESC_GOTOFFLO:
case BFD_RELOC_FRV_GOTOFF12:
case BFD_RELOC_FRV_GOTOFFHI:
case BFD_RELOC_FRV_GOTOFFLO:
case BFD_RELOC_HI16_GOTOFF:
case BFD_RELOC_LO16_GOTOFF:
case BFD_RELOC_FRV_GETTLSOFF:
case BFD_RELOC_FRV_TLSDESC_VALUE:
case BFD_RELOC_FRV_GOTTLSDESC12:

View file

@ -1403,8 +1403,8 @@ gotrel[] =
{ STRING_COMMA_LEN ("GOTPLT"), { _dummy_first_bfd_reloc_code_real,
BFD_RELOC_X86_64_GOTPLT64 },
OPERAND_TYPE_IMM64_DISP64, true },
{ STRING_COMMA_LEN ("GOTOFF"), { BFD_RELOC_386_GOTOFF,
BFD_RELOC_X86_64_GOTOFF64 },
{ STRING_COMMA_LEN ("GOTOFF"), { BFD_RELOC_32_GOTOFF,
BFD_RELOC_64_GOTOFF },
OPERAND_TYPE_IMM64_DISP64, true },
{ STRING_COMMA_LEN ("GOTPCREL"), { _dummy_first_bfd_reloc_code_real,
BFD_RELOC_X86_64_GOTPCREL },
@ -4099,7 +4099,7 @@ tc_i386_fix_adjustable (fixS *fixP)
for size relocations. */
if (fixP->fx_r_type == BFD_RELOC_SIZE32
|| fixP->fx_r_type == BFD_RELOC_SIZE64
|| fixP->fx_r_type == BFD_RELOC_386_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_32_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_386_GOT32
|| fixP->fx_r_type == BFD_RELOC_386_GOT32X
|| fixP->fx_r_type == BFD_RELOC_386_TLS_GD
@ -4129,7 +4129,7 @@ tc_i386_fix_adjustable (fixS *fixP)
|| fixP->fx_r_type == BFD_RELOC_X86_64_CODE_6_GOTTPOFF
|| fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF32
|| fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF64
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTOFF64
|| fixP->fx_r_type == BFD_RELOC_64_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOT64
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC
|| fixP->fx_r_type == BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC
@ -15079,9 +15079,9 @@ i386_finalize_displacement (segT exp_seg ATTRIBUTE_UNUSED, expressionS *exp,
/* We do this to make sure that the section symbol is in
the symbol table. We will ultimately change the relocation
to be relative to the beginning of the section. */
if (i.reloc[this_operand] == BFD_RELOC_386_GOTOFF
if (i.reloc[this_operand] == BFD_RELOC_32_GOTOFF
|| i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL
|| i.reloc[this_operand] == BFD_RELOC_X86_64_GOTOFF64)
|| i.reloc[this_operand] == BFD_RELOC_64_GOTOFF)
{
if (exp->X_op != O_symbol)
goto inv_disp;
@ -15094,7 +15094,7 @@ i386_finalize_displacement (segT exp_seg ATTRIBUTE_UNUSED, expressionS *exp,
exp->X_op_symbol = GOT_symbol;
if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL)
i.reloc[this_operand] = BFD_RELOC_32_PCREL;
else if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTOFF64)
else if (i.reloc[this_operand] == BFD_RELOC_64_GOTOFF)
i.reloc[this_operand] = BFD_RELOC_64;
else
i.reloc[this_operand] = BFD_RELOC_32;
@ -18414,9 +18414,9 @@ i386_validate_fix (fixS *fixp)
else
{
if (!object_64bit)
fixp->fx_r_type = BFD_RELOC_386_GOTOFF;
fixp->fx_r_type = BFD_RELOC_32_GOTOFF;
else
fixp->fx_r_type = BFD_RELOC_X86_64_GOTOFF64;
fixp->fx_r_type = BFD_RELOC_64_GOTOFF;
}
fixp->fx_subsy = 0;
}
@ -18520,7 +18520,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
case BFD_RELOC_386_PLT32:
case BFD_RELOC_386_GOT32:
case BFD_RELOC_386_GOT32X:
case BFD_RELOC_386_GOTOFF:
case BFD_RELOC_32_GOTOFF:
case BFD_RELOC_386_GOTPC:
case BFD_RELOC_386_TLS_GD:
case BFD_RELOC_386_TLS_LDM:
@ -18542,7 +18542,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
case BFD_RELOC_X86_64_TPOFF32:
case BFD_RELOC_X86_64_TPOFF64:
case BFD_RELOC_X86_64_GOTOFF64:
case BFD_RELOC_64_GOTOFF:
case BFD_RELOC_X86_64_GOTPC32:
case BFD_RELOC_X86_64_GOT64:
case BFD_RELOC_X86_64_GOTPCREL64:
@ -18657,7 +18657,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
case BFD_RELOC_X86_64_DTPOFF64:
case BFD_RELOC_X86_64_TPOFF64:
case BFD_RELOC_64_PCREL:
case BFD_RELOC_X86_64_GOTOFF64:
case BFD_RELOC_64_GOTOFF:
case BFD_RELOC_X86_64_GOT64:
case BFD_RELOC_X86_64_GOTPCREL64:
case BFD_RELOC_X86_64_GOTPC64:

View file

@ -318,9 +318,9 @@ md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED,
case LM32_OPERAND_GOT16:
return BFD_RELOC_LM32_16_GOT;
case LM32_OPERAND_GOTOFFHI16:
return BFD_RELOC_LM32_GOTOFF_HI16;
return BFD_RELOC_HI16_GOTOFF;
case LM32_OPERAND_GOTOFFLO16:
return BFD_RELOC_LM32_GOTOFF_LO16;
return BFD_RELOC_LO16_GOTOFF;
case LM32_OPERAND_GP16:
return BFD_RELOC_GPREL16;
case LM32_OPERAND_LO16:

View file

@ -1967,11 +1967,11 @@ m32r_cgen_record_fixup_exp (fragS *frag,
case BFD_RELOC_M32R_GOTOFF:
if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_HI16_SLO)
r_type = BFD_RELOC_M32R_GOTOFF_HI_SLO;
r_type = BFD_RELOC_HI16_S_GOTOFF;
else if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_HI16_ULO)
r_type = BFD_RELOC_M32R_GOTOFF_HI_ULO;
r_type = BFD_RELOC_HI16_GOTOFF;
else if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_LO16)
r_type = BFD_RELOC_M32R_GOTOFF_LO;
r_type = BFD_RELOC_LO16_GOTOFF;
break;
case BFD_RELOC_M32R_26_PLTREL:

View file

@ -679,7 +679,7 @@ parse_imm_addr (const char *line, metag_addr *addr)
addr->reloc_type = BFD_RELOC_METAG_TLS_IE;
}
else if (exp->X_op == O_PIC_reloc &&
exp->X_md == BFD_RELOC_METAG_GOTOFF)
exp->X_md == BFD_RELOC_32_GOTOFF)
{
exp->X_op = O_symbol;
addr->reloc_type = BFD_RELOC_METAG_GETSET_GOTOFF;
@ -1880,12 +1880,12 @@ parse_imm16 (const char *line, metag_insn *insn, int *value)
{
exp->X_op = O_symbol;
if (exp->X_md == BFD_RELOC_METAG_GOTOFF)
if (exp->X_md == BFD_RELOC_32_GOTOFF)
{
if (is_hi)
insn->reloc_type = BFD_RELOC_METAG_HI16_GOTOFF;
insn->reloc_type = BFD_RELOC_HI16_GOTOFF;
else if (is_lo)
insn->reloc_type = BFD_RELOC_METAG_LO16_GOTOFF;
insn->reloc_type = BFD_RELOC_LO16_GOTOFF;
else
return NULL;
}
@ -6779,8 +6779,8 @@ metag_fix_adjustable (fixS * fixP)
if (S_IS_WEAK (fixP->fx_addsy))
return 0;
if (fixP->fx_r_type == BFD_RELOC_METAG_HI16_GOTOFF ||
fixP->fx_r_type == BFD_RELOC_METAG_LO16_GOTOFF ||
if (fixP->fx_r_type == BFD_RELOC_HI16_GOTOFF ||
fixP->fx_r_type == BFD_RELOC_LO16_GOTOFF ||
fixP->fx_r_type == BFD_RELOC_METAG_GETSET_GOTOFF ||
fixP->fx_r_type == BFD_RELOC_METAG_GETSET_GOT ||
fixP->fx_r_type == BFD_RELOC_METAG_HI16_GOTPC ||
@ -6922,7 +6922,7 @@ metag_parse_name (char const * name, expressionS * exprP, enum expr_mode mode,
goto no_suffix;
else if ((next_end = metag_end_of_match (next + 1, "GOTOFF")))
{
reloc_type = BFD_RELOC_METAG_GOTOFF;
reloc_type = BFD_RELOC_32_GOTOFF;
op_type = O_PIC_reloc;
}
else if ((next_end = metag_end_of_match (next + 1, "GOT")))

View file

@ -1294,7 +1294,7 @@ s390_elf_cons (int nbytes /* 1=.byte, 2=.word, 4=.long */)
BFD_RELOC_390_GOT64, /* ELF_SUFFIX_GOT */
BFD_RELOC_64_PLT_PCREL, /* ELF_SUFFIX_PLT */
BFD_RELOC_UNUSED, /* ELF_SUFFIX_GOTENT */
BFD_RELOC_390_GOTOFF64, /* ELF_SUFFIX_GOTOFF */
BFD_RELOC_64_GOTOFF, /* ELF_SUFFIX_GOTOFF */
BFD_RELOC_390_GOTPLT64, /* ELF_SUFFIX_GOTPLT */
BFD_RELOC_390_PLTOFF64, /* ELF_SUFFIX_PLTOFF */
BFD_RELOC_390_TLS_GD64, /* ELF_SUFFIX_TLS_GD */
@ -2383,7 +2383,7 @@ tc_s390_fix_adjustable (fixS *fixP)
/* adjust_reloc_syms doesn't know about the GOT. */
if ( fixP->fx_r_type == BFD_RELOC_16_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_32_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_390_GOTOFF64
|| fixP->fx_r_type == BFD_RELOC_64_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_390_PLTOFF16
|| fixP->fx_r_type == BFD_RELOC_390_PLTOFF32
|| fixP->fx_r_type == BFD_RELOC_390_PLTOFF64
@ -2445,7 +2445,7 @@ tc_s390_force_relocation (struct fix *fixp)
case BFD_RELOC_390_GOT20:
case BFD_RELOC_32_GOT_PCREL:
case BFD_RELOC_32_GOTOFF:
case BFD_RELOC_390_GOTOFF64:
case BFD_RELOC_64_GOTOFF:
case BFD_RELOC_390_PLTOFF16:
case BFD_RELOC_390_PLTOFF32:
case BFD_RELOC_390_PLTOFF64:
@ -2750,7 +2750,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
md_number_to_chars (where, value, sizeof (int));
break;
case BFD_RELOC_390_GOTOFF64:
case BFD_RELOC_64_GOTOFF:
if (fixP->fx_done)
md_number_to_chars (where, value, 8);
break;

View file

@ -256,7 +256,7 @@ parse_ulo16 (CGEN_CPU_DESC cd,
{
*strp += 10;
errmsg = parse_symbolic_address (cd, strp, opindex,
BFD_RELOC_FRV_GOTOFFLO,
BFD_RELOC_LO16_GOTOFF,
& result_type, & value);
if (**strp != ')')
return "missing ')'";
@ -382,7 +382,7 @@ parse_uslo16 (CGEN_CPU_DESC cd,
{
*strp += 10;
errmsg = parse_symbolic_address (cd, strp, opindex,
BFD_RELOC_FRV_GOTOFFLO,
BFD_RELOC_LO16_GOTOFF,
& result_type, & value);
if (**strp != ')')
return "missing ')'";
@ -515,7 +515,7 @@ parse_uhi16 (CGEN_CPU_DESC cd,
{
*strp += 10;
errmsg = parse_symbolic_address (cd, strp, opindex,
BFD_RELOC_FRV_GOTOFFHI,
BFD_RELOC_HI16_GOTOFF,
& result_type, & value);
if (**strp != ')')
return "missing ')'";

View file

@ -211,7 +211,7 @@ parse_gotoff_hi16 (CGEN_CPU_DESC cd,
bfd_vma value;
*strp += 11;
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LM32_GOTOFF_HI16,
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16_GOTOFF,
& result_type, & value);
if (**strp != ')')
return _("missing `)'");
@ -241,7 +241,7 @@ parse_gotoff_lo16 (CGEN_CPU_DESC cd,
bfd_vma value;
*strp += 11;
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LM32_GOTOFF_LO16,
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16_GOTOFF,
&result_type, &value);
if (**strp != ')')
return _("missing `)'");