[binutils-gdb] bfd/Sparc: drop 64-bit BFD_RELOC_* aliases

Jan Beulich via Binutils-cvs <[email protected]>
Newsgroups gmane.comp.gnu.binutils.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=90cbab59178bf37f898df71cfb12b9fc4a0eeb5f

commit 90cbab59178bf37f898df71cfb12b9fc4a0eeb5f
Author: Jan Beulich <[email protected]>
Date:   Thu Apr 9 08:38:33 2026 +0200

    bfd/Sparc: drop 64-bit BFD_RELOC_* aliases
    
    For other relocations (e.g. BFD_RELOC_{8,16,32}{,_PCREL} or
    BFD_RELOC_32_PCREL_S2) the generic enumerator is used. Plus use of such
    aliases obfuscates where the generic types are actually in use.

Diff:
---
 bfd/bfd-in2.h     | 2 --
 bfd/elfxx-sparc.c | 4 ++--
 bfd/reloc.c       | 8 +-------
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index e1f16f40896..22f29584779 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -3467,7 +3467,6 @@ enum bfd_reloc_code_real
   BFD_RELOC_SPARC_BASE22,
 
   /* SPARC64 relocations.  */
-#define BFD_RELOC_SPARC_64 BFD_RELOC_64
   BFD_RELOC_SPARC_10,
   BFD_RELOC_SPARC_11,
   BFD_RELOC_SPARC_OLO10,
@@ -3482,7 +3481,6 @@ enum bfd_reloc_code_real
   BFD_RELOC_SPARC_7,
   BFD_RELOC_SPARC_6,
   BFD_RELOC_SPARC_5,
-#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
   BFD_RELOC_SPARC_HIX22,
   BFD_RELOC_SPARC_LOX10,
   BFD_RELOC_SPARC_H44,
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 070820231bc..138e639591a 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -396,7 +396,7 @@ _bfd_sparc_elf_reloc_type_lookup (bfd *abfd,
     case BFD_RELOC_SPARC_11:
       return &_bfd_sparc_elf_howto_table[R_SPARC_11];
 
-    case BFD_RELOC_SPARC_64:
+    case BFD_RELOC_64:
       return &_bfd_sparc_elf_howto_table[R_SPARC_64];
 
     case BFD_RELOC_SPARC_OLO10:
@@ -435,7 +435,7 @@ _bfd_sparc_elf_reloc_type_lookup (bfd *abfd,
     case BFD_RELOC_SPARC_6:
       return &_bfd_sparc_elf_howto_table[R_SPARC_6];
 
-    case BFD_RELOC_SPARC_DISP64:
+    case BFD_RELOC_64_PCREL:
       return &_bfd_sparc_elf_howto_table[R_SPARC_DISP64];
 
     case BFD_RELOC_64_PLT_PCREL:
diff --git a/bfd/reloc.c b/bfd/reloc.c
index e41a8ccc6c1..9e851ea127a 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -1634,10 +1634,7 @@ ENUMX
 ENUMDOC
   I think these are specific to SPARC a.out (e.g., Sun 4).
 
-ENUMEQ
-  BFD_RELOC_SPARC_64
-  BFD_RELOC_64
-ENUMX
+ENUM
   BFD_RELOC_SPARC_10
 ENUMX
   BFD_RELOC_SPARC_11
@@ -1665,9 +1662,6 @@ ENUMX
   BFD_RELOC_SPARC_6
 ENUMX
   BFD_RELOC_SPARC_5
-ENUMEQX
-  BFD_RELOC_SPARC_DISP64
-  BFD_RELOC_64_PCREL
 ENUMX
   BFD_RELOC_SPARC_HIX22
 ENUMX
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.