From: Jan Beulich Date: Mon, 15 Dec 2025 10:29:33 +0000 (+0100) Subject: bfd/ELF: fold BFD_RELOC__RELATIVE X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d977686cff7708c439725fa67dce9038ff4500c;p=thirdparty%2Fbinutils-gdb.git bfd/ELF: fold BFD_RELOC__RELATIVE There's no need to have a separate reloc per arch; just like for other more or less generic ones a single one will (mostly) do. Arm64, C-Sky, and KVX - sadly - are exceptions. --- diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 244562641c3..c9360bd917a 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -3326,6 +3326,7 @@ enum bfd_reloc_code_real BFD_RELOC_COPY, BFD_RELOC_GLOB_DAT, BFD_RELOC_JMP_SLOT, + BFD_RELOC_RELATIVE, BFD_RELOC_IRELATIVE, /* Size relocations. */ @@ -3333,7 +3334,6 @@ enum bfd_reloc_code_real BFD_RELOC_SIZE64, /* Relocations used by 68K ELF. */ - BFD_RELOC_68K_RELATIVE, BFD_RELOC_68K_TLS_GD32, BFD_RELOC_68K_TLS_GD16, BFD_RELOC_68K_TLS_GD8, @@ -3396,7 +3396,6 @@ enum bfd_reloc_code_real BFD_RELOC_SPARC_PC10, BFD_RELOC_SPARC_PC22, BFD_RELOC_SPARC_WPLT30, - BFD_RELOC_SPARC_RELATIVE, BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32, BFD_RELOC_SPARC_UA64, @@ -3794,9 +3793,6 @@ enum bfd_reloc_code_real bytes in the instruction. */ BFD_RELOC_MN10300_GOT16, - /* Adjust by program base. */ - BFD_RELOC_MN10300_RELATIVE, - /* Together with another reloc targeted at the same location, allows for a value that is the difference of two symbols in the same section. */ @@ -3828,7 +3824,6 @@ enum bfd_reloc_code_real /* i386/elf relocations. */ BFD_RELOC_386_GOT32, BFD_RELOC_386_PLT32, - BFD_RELOC_386_RELATIVE, BFD_RELOC_386_GOTOFF, BFD_RELOC_386_GOTPC, BFD_RELOC_386_TLS_TPOFF, @@ -3850,7 +3845,6 @@ enum bfd_reloc_code_real /* x86-64/elf relocations. */ BFD_RELOC_X86_64_GOT32, - BFD_RELOC_X86_64_RELATIVE, BFD_RELOC_X86_64_GOTPCREL, BFD_RELOC_X86_64_32S, BFD_RELOC_X86_64_DTPMOD64, @@ -3922,7 +3916,6 @@ enum bfd_reloc_code_real BFD_RELOC_PPC_BA16, BFD_RELOC_PPC_BA16_BRTAKEN, BFD_RELOC_PPC_BA16_BRNTAKEN, - BFD_RELOC_PPC_RELATIVE, BFD_RELOC_PPC_LOCAL24PC, BFD_RELOC_PPC_EMB_NADDR32, BFD_RELOC_PPC_EMB_NADDR16, @@ -4179,7 +4172,6 @@ enum bfd_reloc_code_real /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_GOT32, - BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC, BFD_RELOC_ARM_GOT_PREL, @@ -4298,7 +4290,6 @@ enum bfd_reloc_code_real BFD_RELOC_SH_LABEL, BFD_RELOC_SH_LOOP_START, BFD_RELOC_SH_LOOP_END, - BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC, BFD_RELOC_SH_GOT_LOW16, BFD_RELOC_SH_GOT_MEDLOW16, @@ -4406,7 +4397,6 @@ enum bfd_reloc_code_real BFD_RELOC_ARC_32_PCREL, BFD_RELOC_ARC_GOT32, BFD_RELOC_ARC_GOTPC32, - BFD_RELOC_ARC_RELATIVE, BFD_RELOC_ARC_GOTOFF, BFD_RELOC_ARC_GOTPC, BFD_RELOC_ARC_S21W_PCREL_PLT, @@ -4645,7 +4635,6 @@ enum bfd_reloc_code_real /* For PIC. */ BFD_RELOC_M32R_GOT24, BFD_RELOC_M32R_26_PLTREL, - BFD_RELOC_M32R_RELATIVE, BFD_RELOC_M32R_GOTOFF, BFD_RELOC_M32R_GOTOFF_HI_ULO, BFD_RELOC_M32R_GOTOFF_HI_SLO, @@ -4739,7 +4728,6 @@ enum bfd_reloc_code_real BFD_RELOC_NDS32_GOT20, BFD_RELOC_NDS32_9_PLTREL, BFD_RELOC_NDS32_25_PLTREL, - BFD_RELOC_NDS32_RELATIVE, BFD_RELOC_NDS32_GOTOFF, BFD_RELOC_NDS32_GOTOFF_HI20, BFD_RELOC_NDS32_GOTOFF_LO12, @@ -4976,7 +4964,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_RELATIVE, BFD_RELOC_V850_16_GOTOFF, BFD_RELOC_V850_32_GOTOFF, @@ -5125,7 +5112,6 @@ enum bfd_reloc_code_real BFD_RELOC_METAG_RELBRANCH_PLT, BFD_RELOC_METAG_GOTOFF, BFD_RELOC_METAG_PLT, - BFD_RELOC_METAG_RELATIVE, BFD_RELOC_METAG_TLS_GD, BFD_RELOC_METAG_TLS_LDM, BFD_RELOC_METAG_TLS_LDO_HI16, @@ -5449,9 +5435,6 @@ enum bfd_reloc_code_real /* 12 bit GOT offset. */ BFD_RELOC_390_GOT12, - /* Adjust by program base. */ - BFD_RELOC_390_RELATIVE, - /* 32 bit PC relative offset to GOT. */ BFD_RELOC_390_GOTPC, @@ -5907,9 +5890,6 @@ enum bfd_reloc_code_real BFD_RELOC_CRIS_LAPCQ_OFFSET, BFD_RELOC_CRIS_UNSIGNED_4, - /* Relocs used in ELF shared libraries for CRIS. */ - BFD_RELOC_CRIS_RELATIVE, - /* 32-bit offset to symbol-entry within GOT. */ BFD_RELOC_CRIS_32_GOT, @@ -5961,7 +5941,6 @@ enum bfd_reloc_code_real BFD_RELOC_OR1K_PLT26, BFD_RELOC_OR1K_PLTA26, BFD_RELOC_OR1K_GOTOFF_SLO16, - BFD_RELOC_OR1K_RELATIVE, BFD_RELOC_OR1K_TLS_GD_HI16, BFD_RELOC_OR1K_TLS_GD_LO16, BFD_RELOC_OR1K_TLS_GD_PG21, @@ -6002,9 +5981,6 @@ enum bfd_reloc_code_real /* Self-describing complex relocations. */ BFD_RELOC_RELC, - /* Relocations used by VAX ELF. */ - BFD_RELOC_VAX_RELATIVE, - /* Morpho MT - 16 bit immediate relocation. */ BFD_RELOC_MT_PC16, @@ -6094,9 +6070,6 @@ enum bfd_reloc_code_real to one of its own internal functions or data structures. */ BFD_RELOC_XTENSA_RTLD, - /* Xtensa relocations for ELF shared objects. */ - BFD_RELOC_XTENSA_RELATIVE, - /* Xtensa relocation used in ELF object files for symbols that may require PLT entries. Otherwise, this is just a generic 32-bit relocation. */ @@ -6233,7 +6206,6 @@ enum bfd_reloc_code_real BFD_RELOC_LM32_16_GOT, BFD_RELOC_LM32_GOTOFF_HI16, BFD_RELOC_LM32_GOTOFF_LO16, - BFD_RELOC_LM32_RELATIVE, /* Difference between two section addreses. Must be followed by a BFD_RELOC_MACH_O_PAIR. */ @@ -6927,7 +6899,6 @@ enum bfd_reloc_code_real BFD_RELOC_AARCH64_BRANCH9, /* Tilera TILEPro Relocations. */ - BFD_RELOC_TILEPRO_RELATIVE, BFD_RELOC_TILEPRO_BROFF_X1, BFD_RELOC_TILEPRO_JOFFLONG_X1, BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT, @@ -7012,7 +6983,6 @@ enum bfd_reloc_code_real BFD_RELOC_TILEGX_HW0_LAST, BFD_RELOC_TILEGX_HW1_LAST, BFD_RELOC_TILEGX_HW2_LAST, - BFD_RELOC_TILEGX_RELATIVE, BFD_RELOC_TILEGX_BROFF_X1, BFD_RELOC_TILEGX_JUMPOFF_X1, BFD_RELOC_TILEGX_JUMPOFF_X1_PLT, diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index f0c14beecc6..0dfe6cbdf6d 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -665,7 +665,7 @@ static const struct mn10300_reloc_map mn10300_reloc_map[] = { BFD_RELOC_COPY, R_MN10300_COPY }, { BFD_RELOC_GLOB_DAT, R_MN10300_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_MN10300_JMP_SLOT }, - { BFD_RELOC_MN10300_RELATIVE, R_MN10300_RELATIVE }, + { BFD_RELOC_RELATIVE, R_MN10300_RELATIVE }, { BFD_RELOC_MN10300_TLS_GD, R_MN10300_TLS_GD }, { BFD_RELOC_MN10300_TLS_LD, R_MN10300_TLS_LD }, { BFD_RELOC_MN10300_TLS_LDO, R_MN10300_TLS_LDO }, diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index 6a56244b241..824e833e083 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -388,6 +388,7 @@ arc_elf_link_hash_table_create (bfd *abfd) #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 +#define BFD_RELOC_ARC_RELATIVE BFD_RELOC_RELATIVE static const struct arc_reloc_map arc_reloc_map[] = { diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 643d2285d71..a5dda59bc01 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -2018,7 +2018,7 @@ static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] = {BFD_RELOC_THUMB_PCREL_BRANCH7, R_ARM_THM_JUMP6}, {BFD_RELOC_GLOB_DAT, R_ARM_GLOB_DAT}, {BFD_RELOC_JMP_SLOT, R_ARM_JUMP_SLOT}, - {BFD_RELOC_ARM_RELATIVE, R_ARM_RELATIVE}, + {BFD_RELOC_RELATIVE, R_ARM_RELATIVE}, {BFD_RELOC_ARM_GOTOFF, R_ARM_GOTOFF32}, {BFD_RELOC_ARM_GOTPC, R_ARM_GOTPC}, {BFD_RELOC_ARM_GOT_PREL, R_ARM_GOT_PREL}, diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 14aa9cb1a7f..2f861c1d870 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -401,7 +401,7 @@ static const struct cris_reloc_map cris_reloc_map [] = { BFD_RELOC_COPY, R_CRIS_COPY }, { BFD_RELOC_GLOB_DAT, R_CRIS_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_CRIS_JUMP_SLOT }, - { BFD_RELOC_CRIS_RELATIVE, R_CRIS_RELATIVE }, + { BFD_RELOC_RELATIVE, R_CRIS_RELATIVE }, { BFD_RELOC_CRIS_16_GOT, R_CRIS_16_GOT }, { BFD_RELOC_CRIS_32_GOT, R_CRIS_32_GOT }, { BFD_RELOC_CRIS_16_GOTPLT, R_CRIS_16_GOTPLT }, diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index a0da37cf1ff..bcdf88aef11 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -228,8 +228,8 @@ elf_i386_reloc_type_lookup (bfd *abfd, TRACE ("BFD_RELOC_JMP_SLOT"); return &elf_howto_table[R_386_JUMP_SLOT]; - case BFD_RELOC_386_RELATIVE: - TRACE ("BFD_RELOC_386_RELATIVE"); + case BFD_RELOC_RELATIVE: + TRACE ("BFD_RELOC_RELATIVE"); return &elf_howto_table[R_386_RELATIVE]; case BFD_RELOC_386_GOTOFF: diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c index 819eedc529f..3204def77de 100644 --- a/bfd/elf32-lm32.c +++ b/bfd/elf32-lm32.c @@ -447,7 +447,7 @@ static const struct lm32_reloc_map lm32_reloc_map[] = { BFD_RELOC_COPY, R_LM32_COPY }, { BFD_RELOC_GLOB_DAT, R_LM32_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_LM32_JMP_SLOT }, - { BFD_RELOC_LM32_RELATIVE, R_LM32_RELATIVE }, + { BFD_RELOC_RELATIVE, R_LM32_RELATIVE }, }; static reloc_howto_type * diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 79fa7968f18..a60dcf33ea1 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -1214,7 +1214,7 @@ static const struct m32r_reloc_map m32r_reloc_map[] = { BFD_RELOC_COPY, R_M32R_COPY }, { BFD_RELOC_GLOB_DAT, R_M32R_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_M32R_JMP_SLOT }, - { BFD_RELOC_M32R_RELATIVE, R_M32R_RELATIVE }, + { BFD_RELOC_RELATIVE, R_M32R_RELATIVE }, { BFD_RELOC_M32R_GOTOFF, R_M32R_GOTOFF }, { BFD_RELOC_M32R_GOTPC24, R_M32R_GOTPC24 }, { BFD_RELOC_M32R_GOT16_HI_ULO, R_M32R_GOT16_HI_ULO }, diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index 1ece9c2041c..5b9c4c07bc5 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -391,7 +391,7 @@ static const struct { BFD_RELOC_NONE, R_68K_COPY }, { BFD_RELOC_GLOB_DAT, R_68K_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_68K_JMP_SLOT }, - { BFD_RELOC_68K_RELATIVE, R_68K_RELATIVE }, + { BFD_RELOC_RELATIVE, R_68K_RELATIVE }, { BFD_RELOC_CTOR, R_68K_32 }, { BFD_RELOC_VTABLE_INHERIT, R_68K_GNU_VTINHERIT }, { BFD_RELOC_VTABLE_ENTRY, R_68K_GNU_VTENTRY }, diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c index 17189ef3dba..5eb289b6c1c 100644 --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c @@ -722,7 +722,7 @@ static const struct metag_reloc_map metag_reloc_map [] = { BFD_RELOC_METAG_PLT, R_METAG_PLT }, { BFD_RELOC_COPY, R_METAG_COPY }, { BFD_RELOC_JMP_SLOT, R_METAG_JMP_SLOT }, - { BFD_RELOC_METAG_RELATIVE, R_METAG_RELATIVE }, + { BFD_RELOC_RELATIVE, R_METAG_RELATIVE }, { BFD_RELOC_GLOB_DAT, R_METAG_GLOB_DAT }, { BFD_RELOC_METAG_TLS_GD, R_METAG_TLS_GD }, { BFD_RELOC_METAG_TLS_LDM, R_METAG_TLS_LDM }, diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index ef412d031cb..f9e09eecf8a 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -3116,7 +3116,7 @@ static const struct nds32_reloc_map_entry nds32_reloc_map[] = {BFD_RELOC_COPY, R_NDS32_COPY}, {BFD_RELOC_GLOB_DAT, R_NDS32_GLOB_DAT}, {BFD_RELOC_JMP_SLOT, R_NDS32_JMP_SLOT}, - {BFD_RELOC_NDS32_RELATIVE, R_NDS32_RELATIVE}, + {BFD_RELOC_RELATIVE, R_NDS32_RELATIVE}, {BFD_RELOC_NDS32_GOTOFF, R_NDS32_GOTOFF}, {BFD_RELOC_NDS32_GOTOFF_HI20, R_NDS32_GOTOFF_HI20}, {BFD_RELOC_NDS32_GOTOFF_LO12, R_NDS32_GOTOFF_LO12}, diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c index 71d80550973..b247e3f14fe 100644 --- a/bfd/elf32-or1k.c +++ b/bfd/elf32-or1k.c @@ -878,7 +878,7 @@ static const struct or1k_reloc_map or1k_reloc_map[] = { BFD_RELOC_GLOB_DAT, R_OR1K_GLOB_DAT }, { BFD_RELOC_COPY, R_OR1K_COPY }, { BFD_RELOC_JMP_SLOT, R_OR1K_JMP_SLOT }, - { BFD_RELOC_OR1K_RELATIVE, R_OR1K_RELATIVE }, + { BFD_RELOC_RELATIVE, R_OR1K_RELATIVE }, { BFD_RELOC_OR1K_TLS_GD_HI16, R_OR1K_TLS_GD_HI16 }, { BFD_RELOC_OR1K_TLS_GD_LO16, R_OR1K_TLS_GD_LO16 }, { BFD_RELOC_OR1K_TLS_LDM_HI16, R_OR1K_TLS_LDM_HI16 }, diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index c0a28a6d843..2564771705c 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -209,7 +209,7 @@ elf_s390_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, return &elf_howto_table[(int) R_390_GLOB_DAT]; case BFD_RELOC_JMP_SLOT: return &elf_howto_table[(int) R_390_JMP_SLOT]; - case BFD_RELOC_390_RELATIVE: + case BFD_RELOC_RELATIVE: return &elf_howto_table[(int) R_390_RELATIVE]; case BFD_RELOC_32_GOTOFF: return &elf_howto_table[(int) R_390_GOTOFF32]; diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 3e1c76ef833..c539242b9fc 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -358,7 +358,7 @@ static const struct elf_reloc_map sh_reloc_map[] = { BFD_RELOC_COPY, R_SH_COPY }, { BFD_RELOC_GLOB_DAT, R_SH_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_SH_JMP_SLOT }, - { BFD_RELOC_SH_RELATIVE, R_SH_RELATIVE }, + { BFD_RELOC_RELATIVE, R_SH_RELATIVE }, { BFD_RELOC_32_GOTOFF, R_SH_GOTOFF }, { BFD_RELOC_SH_GOTPC, R_SH_GOTPC }, { BFD_RELOC_SH_GOTPLT32, R_SH_GOTPLT32 }, diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c index d766cfcd770..dc206d589d3 100644 --- a/bfd/elf32-tilepro.c +++ b/bfd/elf32-tilepro.c @@ -586,7 +586,7 @@ static const reloc_map tilepro_reloc_map [] = TH_REMAP (BFD_RELOC_COPY, R_TILEPRO_COPY) TH_REMAP (BFD_RELOC_GLOB_DAT, R_TILEPRO_GLOB_DAT) TH_REMAP (BFD_RELOC_JMP_SLOT, R_TILEPRO_JMP_SLOT) - TH_REMAP (BFD_RELOC_TILEPRO_RELATIVE, R_TILEPRO_RELATIVE) + TH_REMAP (BFD_RELOC_RELATIVE, R_TILEPRO_RELATIVE) TH_REMAP (BFD_RELOC_TILEPRO_BROFF_X1, R_TILEPRO_BROFF_X1) TH_REMAP (BFD_RELOC_TILEPRO_JOFFLONG_X1, R_TILEPRO_JOFFLONG_X1) TH_REMAP (BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT, R_TILEPRO_JOFFLONG_X1_PLT) diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index 1c49aeac8ae..48df90c5a69 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -1739,7 +1739,7 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] = { BFD_RELOC_COPY, R_V850_COPY }, { BFD_RELOC_GLOB_DAT, R_V850_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_V850_JMP_SLOT }, - { BFD_RELOC_V850_RELATIVE, R_V850_RELATIVE }, + { 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_V850_CODE, R_V850_CODE }, diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index 91ef605cb4f..12a4e0f40b3 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -314,7 +314,7 @@ static const struct { BFD_RELOC_NONE, R_VAX_COPY }, { BFD_RELOC_GLOB_DAT, R_VAX_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_VAX_JMP_SLOT }, - { BFD_RELOC_VAX_RELATIVE, R_VAX_RELATIVE }, + { BFD_RELOC_RELATIVE, R_VAX_RELATIVE }, { BFD_RELOC_CTOR, R_VAX_32 }, { BFD_RELOC_VTABLE_INHERIT, R_VAX_GNU_VTINHERIT }, { BFD_RELOC_VTABLE_ENTRY, R_VAX_GNU_VTENTRY }, diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 6a0665ec373..0889062ff64 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -421,8 +421,8 @@ elf_xtensa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, TRACE ("BFD_RELOC_JMP_SLOT"); return &elf_howto_table[(unsigned) R_XTENSA_JMP_SLOT ]; - case BFD_RELOC_XTENSA_RELATIVE: - TRACE ("BFD_RELOC_XTENSA_RELATIVE"); + case BFD_RELOC_RELATIVE: + TRACE ("BFD_RELOC_RELATIVE"); return &elf_howto_table[(unsigned) R_XTENSA_RELATIVE ]; case BFD_RELOC_XTENSA_PLT: diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index ac562e38e4d..182a1119cdd 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -223,7 +223,7 @@ elf_s390_reloc_type_lookup (bfd *abfd, return &elf_howto_table[(int) R_390_GLOB_DAT]; case BFD_RELOC_JMP_SLOT: return &elf_howto_table[(int) R_390_JMP_SLOT]; - case BFD_RELOC_390_RELATIVE: + case BFD_RELOC_RELATIVE: return &elf_howto_table[(int) R_390_RELATIVE]; case BFD_RELOC_32_GOTOFF: return &elf_howto_table[(int) R_390_GOTOFF32]; diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 60746974bb3..fdcbda4913e 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -237,7 +237,7 @@ static const struct elf_reloc_map x86_64_reloc_map[] = { BFD_RELOC_COPY, R_X86_64_COPY, }, { BFD_RELOC_GLOB_DAT, R_X86_64_GLOB_DAT, }, { BFD_RELOC_JMP_SLOT, R_X86_64_JUMP_SLOT, }, - { BFD_RELOC_X86_64_RELATIVE, R_X86_64_RELATIVE, }, + { BFD_RELOC_RELATIVE, R_X86_64_RELATIVE, }, { BFD_RELOC_X86_64_GOTPCREL, R_X86_64_GOTPCREL, }, { BFD_RELOC_32, R_X86_64_32, }, { BFD_RELOC_X86_64_32S, R_X86_64_32S, }, diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index adda19b9ffd..8f4b0461962 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -381,7 +381,7 @@ _bfd_sparc_elf_reloc_type_lookup (bfd *abfd, case BFD_RELOC_JMP_SLOT: return &_bfd_sparc_elf_howto_table[R_SPARC_JMP_SLOT]; - case BFD_RELOC_SPARC_RELATIVE: + case BFD_RELOC_RELATIVE: return &_bfd_sparc_elf_howto_table[R_SPARC_RELATIVE]; case BFD_RELOC_SPARC_UA32: diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c index b503613aba4..f23adf47ac2 100644 --- a/bfd/elfxx-tilegx.c +++ b/bfd/elfxx-tilegx.c @@ -653,6 +653,7 @@ static const reloc_map tilegx_reloc_map [] = TH_REMAP (BFD_RELOC_COPY, R_TILEGX_COPY) TH_REMAP (BFD_RELOC_GLOB_DAT, R_TILEGX_GLOB_DAT) TH_REMAP (BFD_RELOC_JMP_SLOT, R_TILEGX_JMP_SLOT) + TH_REMAP (BFD_RELOC_RELATIVE, R_TILEGX_RELATIVE) #define SIMPLE_REMAP(t) TH_REMAP (BFD_RELOC_##t, R_##t) @@ -664,7 +665,6 @@ static const reloc_map tilegx_reloc_map [] = SIMPLE_REMAP (TILEGX_HW0_LAST) SIMPLE_REMAP (TILEGX_HW1_LAST) SIMPLE_REMAP (TILEGX_HW2_LAST) - SIMPLE_REMAP (TILEGX_RELATIVE) SIMPLE_REMAP (TILEGX_BROFF_X1) SIMPLE_REMAP (TILEGX_JUMPOFF_X1) SIMPLE_REMAP (TILEGX_JUMPOFF_X1_PLT) diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 21426a96424..d61e02a882c 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -1102,10 +1102,10 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_COPY", "BFD_RELOC_GLOB_DAT", "BFD_RELOC_JMP_SLOT", + "BFD_RELOC_RELATIVE", "BFD_RELOC_IRELATIVE", "BFD_RELOC_SIZE32", "BFD_RELOC_SIZE64", - "BFD_RELOC_68K_RELATIVE", "BFD_RELOC_68K_TLS_GD32", "BFD_RELOC_68K_TLS_GD16", "BFD_RELOC_68K_TLS_GD8", @@ -1146,7 +1146,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_SPARC_PC10", "BFD_RELOC_SPARC_PC22", "BFD_RELOC_SPARC_WPLT30", - "BFD_RELOC_SPARC_RELATIVE", "BFD_RELOC_SPARC_UA16", "BFD_RELOC_SPARC_UA32", "BFD_RELOC_SPARC_UA64", @@ -1396,7 +1395,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_MN10300_GOT32", "BFD_RELOC_MN10300_GOT24", "BFD_RELOC_MN10300_GOT16", - "BFD_RELOC_MN10300_RELATIVE", "BFD_RELOC_MN10300_SYM_DIFF", "BFD_RELOC_MN10300_ALIGN", "BFD_RELOC_MN10300_TLS_GD", @@ -1412,7 +1410,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_MN10300_16_PCREL", "BFD_RELOC_386_GOT32", "BFD_RELOC_386_PLT32", - "BFD_RELOC_386_RELATIVE", "BFD_RELOC_386_GOTOFF", "BFD_RELOC_386_GOTPC", "BFD_RELOC_386_TLS_TPOFF", @@ -1432,7 +1429,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_386_TLS_DESC", "BFD_RELOC_386_GOT32X", "BFD_RELOC_X86_64_GOT32", - "BFD_RELOC_X86_64_RELATIVE", "BFD_RELOC_X86_64_GOTPCREL", "BFD_RELOC_X86_64_32S", "BFD_RELOC_X86_64_DTPMOD64", @@ -1496,7 +1492,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_PPC_BA16", "BFD_RELOC_PPC_BA16_BRTAKEN", "BFD_RELOC_PPC_BA16_BRNTAKEN", - "BFD_RELOC_PPC_RELATIVE", "BFD_RELOC_PPC_LOCAL24PC", "BFD_RELOC_PPC_EMB_NADDR32", "BFD_RELOC_PPC_EMB_NADDR16", @@ -1690,7 +1685,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_RELATIVE", "BFD_RELOC_ARM_GOTOFF", "BFD_RELOC_ARM_GOTPC", "BFD_RELOC_ARM_GOT_PREL", @@ -1796,7 +1790,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_SH_LABEL", "BFD_RELOC_SH_LOOP_START", "BFD_RELOC_SH_LOOP_END", - "BFD_RELOC_SH_RELATIVE", "BFD_RELOC_SH_GOTPC", "BFD_RELOC_SH_GOT_LOW16", "BFD_RELOC_SH_GOT_MEDLOW16", @@ -1902,7 +1895,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_RELATIVE", "BFD_RELOC_ARC_GOTOFF", "BFD_RELOC_ARC_GOTPC", "BFD_RELOC_ARC_S21W_PCREL_PLT", @@ -2000,7 +1992,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_M32R_SDA16", "BFD_RELOC_M32R_GOT24", "BFD_RELOC_M32R_26_PLTREL", - "BFD_RELOC_M32R_RELATIVE", "BFD_RELOC_M32R_GOTOFF", "BFD_RELOC_M32R_GOTOFF_HI_ULO", "BFD_RELOC_M32R_GOTOFF_HI_SLO", @@ -2035,7 +2026,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_NDS32_GOT20", "BFD_RELOC_NDS32_9_PLTREL", "BFD_RELOC_NDS32_25_PLTREL", - "BFD_RELOC_NDS32_RELATIVE", "BFD_RELOC_NDS32_GOTOFF", "BFD_RELOC_NDS32_GOTOFF_HI20", "BFD_RELOC_NDS32_GOTOFF_LO12", @@ -2174,7 +2164,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_RELATIVE", "BFD_RELOC_V850_16_GOTOFF", "BFD_RELOC_V850_32_GOTOFF", "BFD_RELOC_V850_CODE", @@ -2266,7 +2255,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_METAG_RELBRANCH_PLT", "BFD_RELOC_METAG_GOTOFF", "BFD_RELOC_METAG_PLT", - "BFD_RELOC_METAG_RELATIVE", "BFD_RELOC_METAG_TLS_GD", "BFD_RELOC_METAG_TLS_LDM", "BFD_RELOC_METAG_TLS_LDO_HI16", @@ -2450,7 +2438,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_RX_RELAX", "BFD_RELOC_390_12", "BFD_RELOC_390_GOT12", - "BFD_RELOC_390_RELATIVE", "BFD_RELOC_390_GOTPC", "BFD_RELOC_390_GOT16", "BFD_RELOC_390_PC12DBL", @@ -2692,7 +2679,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_CRIS_UNSIGNED_16", "BFD_RELOC_CRIS_LAPCQ_OFFSET", "BFD_RELOC_CRIS_UNSIGNED_4", - "BFD_RELOC_CRIS_RELATIVE", "BFD_RELOC_CRIS_32_GOT", "BFD_RELOC_CRIS_16_GOT", "BFD_RELOC_CRIS_32_GOTPLT", @@ -2726,7 +2712,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_OR1K_PLT26", "BFD_RELOC_OR1K_PLTA26", "BFD_RELOC_OR1K_GOTOFF_SLO16", - "BFD_RELOC_OR1K_RELATIVE", "BFD_RELOC_OR1K_TLS_GD_HI16", "BFD_RELOC_OR1K_TLS_GD_LO16", "BFD_RELOC_OR1K_TLS_GD_PG21", @@ -2760,7 +2745,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_XSTORMY16_24", "BFD_RELOC_XSTORMY16_FPTR16", "BFD_RELOC_RELC", - "BFD_RELOC_VAX_RELATIVE", "BFD_RELOC_MT_PC16", "BFD_RELOC_MT_HI16", "BFD_RELOC_MT_LO16", @@ -2807,7 +2791,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_IQ2000_OFFSET_21", "BFD_RELOC_IQ2000_UHI16", "BFD_RELOC_XTENSA_RTLD", - "BFD_RELOC_XTENSA_RELATIVE", "BFD_RELOC_XTENSA_PLT", "BFD_RELOC_XTENSA_DIFF8", "BFD_RELOC_XTENSA_DIFF16", @@ -2876,7 +2859,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_LM32_16_GOT", "BFD_RELOC_LM32_GOTOFF_HI16", "BFD_RELOC_LM32_GOTOFF_LO16", - "BFD_RELOC_LM32_RELATIVE", "BFD_RELOC_MACH_O_SECTDIFF", "BFD_RELOC_MACH_O_LOCAL_SECTDIFF", "BFD_RELOC_MACH_O_PAIR", @@ -3127,7 +3109,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC", "BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC", "BFD_RELOC_AARCH64_BRANCH9", - "BFD_RELOC_TILEPRO_RELATIVE", "BFD_RELOC_TILEPRO_BROFF_X1", "BFD_RELOC_TILEPRO_JOFFLONG_X1", "BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT", @@ -3210,7 +3191,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_TILEGX_HW0_LAST", "BFD_RELOC_TILEGX_HW1_LAST", "BFD_RELOC_TILEGX_HW2_LAST", - "BFD_RELOC_TILEGX_RELATIVE", "BFD_RELOC_TILEGX_BROFF_X1", "BFD_RELOC_TILEGX_JUMPOFF_X1", "BFD_RELOC_TILEGX_JUMPOFF_X1_PLT", diff --git a/bfd/reloc.c b/bfd/reloc.c index 625ddf22d93..165060d96ce 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -1476,6 +1476,8 @@ ENUMX BFD_RELOC_GLOB_DAT ENUMX BFD_RELOC_JMP_SLOT +ENUMX + BFD_RELOC_RELATIVE ENUMX BFD_RELOC_IRELATIVE ENUMDOC @@ -1489,8 +1491,6 @@ ENUMDOC Size relocations. ENUM - BFD_RELOC_68K_RELATIVE -ENUMX BFD_RELOC_68K_TLS_GD32 ENUMX BFD_RELOC_68K_TLS_GD16 @@ -1597,8 +1597,6 @@ ENUMX BFD_RELOC_SPARC_PC22 ENUMX BFD_RELOC_SPARC_WPLT30 -ENUMX - BFD_RELOC_SPARC_RELATIVE ENUMX BFD_RELOC_SPARC_UA16 ENUMX @@ -2287,10 +2285,6 @@ ENUM ENUMDOC This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes in the instruction. -ENUM - BFD_RELOC_MN10300_RELATIVE -ENUMDOC - Adjust by program base. ENUM BFD_RELOC_MN10300_SYM_DIFF ENUMDOC @@ -2337,8 +2331,6 @@ ENUM BFD_RELOC_386_GOT32 ENUMX BFD_RELOC_386_PLT32 -ENUMX - BFD_RELOC_386_RELATIVE ENUMX BFD_RELOC_386_GOTOFF ENUMX @@ -2380,8 +2372,6 @@ ENUMDOC ENUM BFD_RELOC_X86_64_GOT32 -ENUMX - BFD_RELOC_X86_64_RELATIVE ENUMX BFD_RELOC_X86_64_GOTPCREL ENUMX @@ -2520,8 +2510,6 @@ ENUMX BFD_RELOC_PPC_BA16_BRTAKEN ENUMX BFD_RELOC_PPC_BA16_BRNTAKEN -ENUMX - BFD_RELOC_PPC_RELATIVE ENUMX BFD_RELOC_PPC_LOCAL24PC ENUMX @@ -2986,8 +2974,6 @@ ENUMDOC ENUM BFD_RELOC_ARM_GOT32 -ENUMX - BFD_RELOC_ARM_RELATIVE ENUMX BFD_RELOC_ARM_GOTOFF ENUMX @@ -3217,8 +3203,6 @@ ENUMX BFD_RELOC_SH_LOOP_START ENUMX BFD_RELOC_SH_LOOP_END -ENUMX - BFD_RELOC_SH_RELATIVE ENUMX BFD_RELOC_SH_GOTPC ENUMX @@ -3432,8 +3416,6 @@ ENUMX BFD_RELOC_ARC_GOT32 ENUMX BFD_RELOC_ARC_GOTPC32 -ENUMX - BFD_RELOC_ARC_RELATIVE ENUMX BFD_RELOC_ARC_GOTOFF ENUMX @@ -3775,8 +3757,6 @@ ENUM BFD_RELOC_M32R_GOT24 ENUMX BFD_RELOC_M32R_26_PLTREL -ENUMX - BFD_RELOC_M32R_RELATIVE ENUMX BFD_RELOC_M32R_GOTOFF ENUMX @@ -3906,8 +3886,6 @@ ENUMX BFD_RELOC_NDS32_9_PLTREL ENUMX BFD_RELOC_NDS32_25_PLTREL -ENUMX - BFD_RELOC_NDS32_RELATIVE ENUMX BFD_RELOC_NDS32_GOTOFF ENUMX @@ -4285,8 +4263,6 @@ ENUMX BFD_RELOC_V850_22_PLT_PCREL ENUMX BFD_RELOC_V850_32_PLT_PCREL -ENUMX - BFD_RELOC_V850_RELATIVE ENUMX BFD_RELOC_V850_16_GOTOFF ENUMX @@ -4537,8 +4513,6 @@ ENUMX BFD_RELOC_METAG_GOTOFF ENUMX BFD_RELOC_METAG_PLT -ENUMX - BFD_RELOC_METAG_RELATIVE ENUMX BFD_RELOC_METAG_TLS_GD ENUMX @@ -5052,10 +5026,6 @@ ENUM BFD_RELOC_390_GOT12 ENUMDOC 12 bit GOT offset. -ENUM - BFD_RELOC_390_RELATIVE -ENUMDOC - Adjust by program base. ENUM BFD_RELOC_390_GOTPC ENUMDOC @@ -5762,10 +5732,6 @@ ENUMX ENUMDOC These relocs are only used within the CRIS assembler. They are not (at present) written to any object files. -ENUM - BFD_RELOC_CRIS_RELATIVE -ENUMDOC - Relocs used in ELF shared libraries for CRIS. ENUM BFD_RELOC_CRIS_32_GOT ENUMDOC @@ -5851,8 +5817,6 @@ ENUMX BFD_RELOC_OR1K_PLTA26 ENUMX BFD_RELOC_OR1K_GOTOFF_SLO16 -ENUMX - BFD_RELOC_OR1K_RELATIVE ENUMX BFD_RELOC_OR1K_TLS_GD_HI16 ENUMX @@ -5931,11 +5895,6 @@ ENUM ENUMDOC Self-describing complex relocations. -ENUM - BFD_RELOC_VAX_RELATIVE -ENUMDOC - Relocations used by VAX ELF. - ENUM BFD_RELOC_MT_PC16 ENUMDOC @@ -6075,10 +6034,6 @@ ENUMDOC Special Xtensa relocation used only by PLT entries in ELF shared objects to indicate that the runtime linker should set the value to one of its own internal functions or data structures. -ENUM - BFD_RELOC_XTENSA_RELATIVE -ENUMDOC - Xtensa relocations for ELF shared objects. ENUM BFD_RELOC_XTENSA_PLT ENUMDOC @@ -6285,8 +6240,6 @@ ENUMX BFD_RELOC_LM32_GOTOFF_HI16 ENUMX BFD_RELOC_LM32_GOTOFF_LO16 -ENUMX - BFD_RELOC_LM32_RELATIVE ENUMDOC Lattice Mico32 relocations. @@ -7236,8 +7189,6 @@ ENUMDOC The lowest two bits must be zero and are not stored in the instruction, giving an 11 bit signed byte offset. ENUM - BFD_RELOC_TILEPRO_RELATIVE -ENUMX BFD_RELOC_TILEPRO_BROFF_X1 ENUMX BFD_RELOC_TILEPRO_JOFFLONG_X1 @@ -7403,8 +7354,6 @@ ENUMX BFD_RELOC_TILEGX_HW1_LAST ENUMX BFD_RELOC_TILEGX_HW2_LAST -ENUMX - BFD_RELOC_TILEGX_RELATIVE ENUMX BFD_RELOC_TILEGX_BROFF_X1 ENUMX diff --git a/include/elf/cris.h b/include/elf/cris.h index 41300345e71..b5cf0e766e5 100644 --- a/include/elf/cris.h +++ b/include/elf/cris.h @@ -52,7 +52,7 @@ START_RELOC_NUMBERS (elf_cris_reloc_type) RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11) /* Adjust by program base. Generated by the linker. - The BFD equivalent is BFD_RELOC_CRIS_RELATIVE. */ + The BFD equivalent is BFD_RELOC_RELATIVE. */ RELOC_NUMBER (R_CRIS_RELATIVE, 12) /* A 16-bit offset to entry in GOT and request to create GOT entry for