]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Sparc: use BFD_RELOC_<n>_PLT_PCREL in favor of custom types
authorJan Beulich <jbeulich@suse.com>
Mon, 15 Dec 2025 09:48:47 +0000 (10:48 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 15 Dec 2025 09:48:47 +0000 (10:48 +0100)
No reason to have separate types when the generic ones have no (other)
meaning for this target.

bfd/bfd-in2.h
bfd/elfxx-sparc.c
bfd/libbfd.h
bfd/reloc.c
gas/config/tc-sparc.c

index caad47a4a62921abe724e083ff54a13c83e72693..bb5542a63dfeb4a8ce9c17705c8f25a8b08b26b4 100644 (file)
@@ -3430,8 +3430,6 @@ enum bfd_reloc_code_real
   BFD_RELOC_SPARC_6,
   BFD_RELOC_SPARC_5,
 #define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
-  BFD_RELOC_SPARC_PLT32,
-  BFD_RELOC_SPARC_PLT64,
   BFD_RELOC_SPARC_HIX22,
   BFD_RELOC_SPARC_LOX10,
   BFD_RELOC_SPARC_H44,
index bd1dcf78b62428aefe2cca05fd736d8876ab4134..780122619a16a46a6311355cbc479c4ad6e04104 100644 (file)
@@ -387,7 +387,7 @@ _bfd_sparc_elf_reloc_type_lookup (bfd *abfd,
     case BFD_RELOC_SPARC_UA32:
       return &_bfd_sparc_elf_howto_table[R_SPARC_UA32];
 
-    case BFD_RELOC_SPARC_PLT32:
+    case BFD_RELOC_32_PLT_PCREL:
       return &_bfd_sparc_elf_howto_table[R_SPARC_PLT32];
 
     case BFD_RELOC_SPARC_10:
@@ -438,7 +438,7 @@ _bfd_sparc_elf_reloc_type_lookup (bfd *abfd,
     case BFD_RELOC_SPARC_DISP64:
       return &_bfd_sparc_elf_howto_table[R_SPARC_DISP64];
 
-    case BFD_RELOC_SPARC_PLT64:
+    case BFD_RELOC_64_PLT_PCREL:
       return &_bfd_sparc_elf_howto_table[R_SPARC_PLT64];
 
     case BFD_RELOC_SPARC_HIX22:
index 91cdee7fc4ae7720a1ab4fde17fda562d806e61d..795241a6361c83936528f5350a872f6ea6b778da 100644 (file)
@@ -1174,8 +1174,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_SPARC_7",
   "BFD_RELOC_SPARC_6",
   "BFD_RELOC_SPARC_5",
-  "BFD_RELOC_SPARC_PLT32",
-  "BFD_RELOC_SPARC_PLT64",
   "BFD_RELOC_SPARC_HIX22",
   "BFD_RELOC_SPARC_LOX10",
   "BFD_RELOC_SPARC_H44",
index 18f53e38255af716031a6775b78813764e1967d5..9bf431a9f2f77a4f3629f83338380df71d82924b 100644 (file)
@@ -1666,10 +1666,6 @@ ENUMX
 ENUMEQX
   BFD_RELOC_SPARC_DISP64
   BFD_RELOC_64_PCREL
-ENUMX
-  BFD_RELOC_SPARC_PLT32
-ENUMX
-  BFD_RELOC_SPARC_PLT64
 ENUMX
   BFD_RELOC_SPARC_HIX22
 ENUMX
index 65043af78d5db65148e6731217afe07dd310b69d..df475555557c3aa8172ea31a05e30d4a14fddbbd 100644 (file)
@@ -3915,8 +3915,8 @@ tc_gen_reloc (asection *section, fixS *fixp)
     case BFD_RELOC_16_PCREL:
     case BFD_RELOC_32_PCREL:
     case BFD_RELOC_64_PCREL:
-    case BFD_RELOC_SPARC_PLT32:
-    case BFD_RELOC_SPARC_PLT64:
+    case BFD_RELOC_32_PLT_PCREL:
+    case BFD_RELOC_64_PLT_PCREL:
     case BFD_RELOC_VTABLE_ENTRY:
     case BFD_RELOC_VTABLE_INHERIT:
     case BFD_RELOC_SPARC_TLS_GD_HI22:
@@ -4904,8 +4904,8 @@ cons_fix_new_sparc (fragS *frag,
       else if (*sparc_cons_special_reloc == 'p')
        switch (nbytes)
          {
-         case 4: r = BFD_RELOC_SPARC_PLT32; break;
-         case 8: r = BFD_RELOC_SPARC_PLT64; break;
+         case 4: r = BFD_RELOC_32_PLT_PCREL; break;
+         case 8: r = BFD_RELOC_64_PLT_PCREL; break;
          }
       else
        switch (nbytes)