[13/14] bfd/ELF: fold BFD_RELOC_<arch>_RELATIVE

Message ID ca89e5d8-0994-446a-ad7a-bc3b1e6b54e0@suse.com
State New
Headers
Series bfd: a little bit of reloc enum cleanup |

Commit Message

Jan Beulich Nov. 28, 2025, 11:53 a.m. UTC
  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.
  

Patch

--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -3336,6 +3336,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.  */
@@ -3343,7 +3344,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,
@@ -3406,7 +3406,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,
@@ -3804,9 +3803,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.  */
@@ -3838,7 +3834,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,
@@ -3860,7 +3855,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,
@@ -3932,7 +3926,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,
@@ -4189,7 +4182,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,
@@ -4308,7 +4300,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,
@@ -4416,7 +4407,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,
@@ -4655,7 +4645,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,
@@ -4749,7 +4738,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,
@@ -4986,7 +4974,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,
 
@@ -5135,7 +5122,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,
@@ -5459,9 +5445,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,
 
@@ -5917,9 +5900,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,
 
@@ -5971,7 +5951,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,
@@ -6012,9 +5991,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,
 
@@ -6104,9 +6080,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.  */
@@ -6243,7 +6216,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.  */
@@ -6937,7 +6909,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,
@@ -7022,7 +6993,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,
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -665,7 +665,7 @@  static const struct mn10300_reloc_map mn
   { 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 },
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -388,6 +388,7 @@  arc_elf_link_hash_table_create (bfd *abf
 #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[] =
 {
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2018,7 +2018,7 @@  static const struct 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},
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -401,7 +401,7 @@  static const struct cris_reloc_map cris_
   { 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 },
--- 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:
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -447,7 +447,7 @@  static const struct lm32_reloc_map lm32_
   { 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 *
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -1214,7 +1214,7 @@  static const struct m32r_reloc_map m32r_
   { 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 },
--- 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 },
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -722,7 +722,7 @@  static const struct metag_reloc_map meta
     { 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 },
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -3116,7 +3116,7 @@  static const struct nds32_reloc_map_entr
   {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},
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -878,7 +878,7 @@  static const struct or1k_reloc_map or1k_
   { 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 },
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -209,7 +209,7 @@  elf_s390_reloc_type_lookup (bfd *abfd AT
       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];
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -358,7 +358,7 @@  static const struct elf_reloc_map sh_rel
   { 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 },
--- 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)
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1739,7 +1739,7 @@  static const struct v850_elf_reloc_map v
   { 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			 },
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -313,7 +313,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 },
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -422,8 +422,8 @@  elf_xtensa_reloc_type_lookup (bfd *abfd
       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:
--- 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];
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -237,7 +237,7 @@  static const struct elf_reloc_map x86_64
   { 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, },
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -381,7 +381,7 @@  _bfd_sparc_elf_reloc_type_lookup (bfd *a
     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:
--- 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)
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1102,10 +1102,10 @@  static const char *const bfd_reloc_code_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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_
   "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",
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -1477,6 +1477,8 @@  ENUMX
 ENUMX
   BFD_RELOC_JMP_SLOT
 ENUMX
+  BFD_RELOC_RELATIVE
+ENUMX
   BFD_RELOC_IRELATIVE
 ENUMDOC
   For ELF.
@@ -1489,8 +1491,6 @@  ENUMDOC
   Size relocations.
 
 ENUM
-  BFD_RELOC_68K_RELATIVE
-ENUMX
   BFD_RELOC_68K_TLS_GD32
 ENUMX
   BFD_RELOC_68K_TLS_GD16
@@ -1598,8 +1598,6 @@  ENUMX
 ENUMX
   BFD_RELOC_SPARC_WPLT30
 ENUMX
-  BFD_RELOC_SPARC_RELATIVE
-ENUMX
   BFD_RELOC_SPARC_UA16
 ENUMX
   BFD_RELOC_SPARC_UA32
@@ -2288,10 +2286,6 @@  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
   Together with another reloc targeted at the same location, allows
@@ -2338,8 +2332,6 @@  ENUM
 ENUMX
   BFD_RELOC_386_PLT32
 ENUMX
-  BFD_RELOC_386_RELATIVE
-ENUMX
   BFD_RELOC_386_GOTOFF
 ENUMX
   BFD_RELOC_386_GOTPC
@@ -2381,8 +2373,6 @@  ENUMDOC
 ENUM
   BFD_RELOC_X86_64_GOT32
 ENUMX
-  BFD_RELOC_X86_64_RELATIVE
-ENUMX
   BFD_RELOC_X86_64_GOTPCREL
 ENUMX
   BFD_RELOC_X86_64_32S
@@ -2521,8 +2511,6 @@  ENUMX
 ENUMX
   BFD_RELOC_PPC_BA16_BRNTAKEN
 ENUMX
-  BFD_RELOC_PPC_RELATIVE
-ENUMX
   BFD_RELOC_PPC_LOCAL24PC
 ENUMX
   BFD_RELOC_PPC_EMB_NADDR32
@@ -2987,8 +2975,6 @@  ENUMDOC
 ENUM
   BFD_RELOC_ARM_GOT32
 ENUMX
-  BFD_RELOC_ARM_RELATIVE
-ENUMX
   BFD_RELOC_ARM_GOTOFF
 ENUMX
   BFD_RELOC_ARM_GOTPC
@@ -3218,8 +3204,6 @@  ENUMX
 ENUMX
   BFD_RELOC_SH_LOOP_END
 ENUMX
-  BFD_RELOC_SH_RELATIVE
-ENUMX
   BFD_RELOC_SH_GOTPC
 ENUMX
   BFD_RELOC_SH_GOT_LOW16
@@ -3433,8 +3417,6 @@  ENUMX
 ENUMX
   BFD_RELOC_ARC_GOTPC32
 ENUMX
-  BFD_RELOC_ARC_RELATIVE
-ENUMX
   BFD_RELOC_ARC_GOTOFF
 ENUMX
   BFD_RELOC_ARC_GOTPC
@@ -3776,8 +3758,6 @@  ENUM
 ENUMX
   BFD_RELOC_M32R_26_PLTREL
 ENUMX
-  BFD_RELOC_M32R_RELATIVE
-ENUMX
   BFD_RELOC_M32R_GOTOFF
 ENUMX
   BFD_RELOC_M32R_GOTOFF_HI_ULO
@@ -3907,8 +3887,6 @@  ENUMX
 ENUMX
   BFD_RELOC_NDS32_25_PLTREL
 ENUMX
-  BFD_RELOC_NDS32_RELATIVE
-ENUMX
   BFD_RELOC_NDS32_GOTOFF
 ENUMX
   BFD_RELOC_NDS32_GOTOFF_HI20
@@ -4286,8 +4264,6 @@  ENUMX
 ENUMX
   BFD_RELOC_V850_32_PLT_PCREL
 ENUMX
-  BFD_RELOC_V850_RELATIVE
-ENUMX
   BFD_RELOC_V850_16_GOTOFF
 ENUMX
   BFD_RELOC_V850_32_GOTOFF
@@ -4538,8 +4514,6 @@  ENUMX
 ENUMX
   BFD_RELOC_METAG_PLT
 ENUMX
-  BFD_RELOC_METAG_RELATIVE
-ENUMX
   BFD_RELOC_METAG_TLS_GD
 ENUMX
   BFD_RELOC_METAG_TLS_LDM
@@ -5053,10 +5027,6 @@  ENUM
 ENUMDOC
   12 bit GOT offset.
 ENUM
-  BFD_RELOC_390_RELATIVE
-ENUMDOC
-  Adjust by program base.
-ENUM
   BFD_RELOC_390_GOTPC
 ENUMDOC
   32 bit PC relative offset to GOT.
@@ -5763,10 +5733,6 @@  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
   32-bit offset to symbol-entry within GOT.
@@ -5852,8 +5818,6 @@  ENUMX
 ENUMX
   BFD_RELOC_OR1K_GOTOFF_SLO16
 ENUMX
-  BFD_RELOC_OR1K_RELATIVE
-ENUMX
   BFD_RELOC_OR1K_TLS_GD_HI16
 ENUMX
   BFD_RELOC_OR1K_TLS_GD_LO16
@@ -5932,11 +5896,6 @@  ENUMDOC
   Self-describing complex relocations.
 
 ENUM
-  BFD_RELOC_VAX_RELATIVE
-ENUMDOC
-  Relocations used by VAX ELF.
-
-ENUM
   BFD_RELOC_MT_PC16
 ENUMDOC
   Morpho MT - 16 bit immediate relocation.
@@ -6076,10 +6035,6 @@  ENUMDOC
   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
   Xtensa relocation used in ELF object files for symbols that may
@@ -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
@@ -7404,8 +7355,6 @@  ENUMX
 ENUMX
   BFD_RELOC_TILEGX_HW2_LAST
 ENUMX
-  BFD_RELOC_TILEGX_RELATIVE
-ENUMX
   BFD_RELOC_TILEGX_BROFF_X1
 ENUMX
   BFD_RELOC_TILEGX_JUMPOFF_X1
--- 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