[PATCH 24/27] bfd/ELF: _bfd_elf{,32,64}_hppa_gen_reloc_type are exposed to gas

Jan Beulich jbeulich@suse.com
Mon Oct 27 14:24:08 GMT 2025


As non-private functions / macros, they shouldn't have "_bfd_" prefixes,
but merely "bfd_" ones.
---
Considering adjacent functions, even the "bfd_" prefix is questionable. Or
maybe all others should actually gain such a prefix?

--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -30,7 +30,7 @@
 #define ELF_R_TYPE(X)		      ELF64_R_TYPE(X)
 #define ELF_R_SYM(X)		      ELF64_R_SYM(X)
 #define elf_hppa_reloc_final_type     elf64_hppa_reloc_final_type
-#define _bfd_elf_hppa_gen_reloc_type  _bfd_elf64_hppa_gen_reloc_type
+#define bfd_elf_hppa_gen_reloc_type   bfd_elf64_hppa_gen_reloc_type
 #define elf_hppa_relocate_section     elf64_hppa_relocate_section
 #define elf_hppa_final_link	      elf64_hppa_final_link
 #endif
@@ -38,7 +38,7 @@
 #define ELF_R_TYPE(X)		      ELF32_R_TYPE(X)
 #define ELF_R_SYM(X)		      ELF32_R_SYM(X)
 #define elf_hppa_reloc_final_type     elf32_hppa_reloc_final_type
-#define _bfd_elf_hppa_gen_reloc_type  _bfd_elf32_hppa_gen_reloc_type
+#define bfd_elf_hppa_gen_reloc_type   bfd_elf32_hppa_gen_reloc_type
 #define elf_hppa_relocate_section     elf32_hppa_relocate_section
 #define elf_hppa_final_link	      elf32_hppa_final_link
 #endif
@@ -745,12 +745,12 @@ elf_hppa_reloc_final_type (bfd *abfd,
    relocation with modifications based on format and field.  */
 
 elf_hppa_reloc_type **
-_bfd_elf_hppa_gen_reloc_type (bfd *abfd,
-			      elf_hppa_reloc_type base_type,
-			      int format,
-			      unsigned int field,
-			      int ignore ATTRIBUTE_UNUSED,
-			      asymbol *sym ATTRIBUTE_UNUSED)
+bfd_elf_hppa_gen_reloc_type (bfd *abfd,
+			     elf_hppa_reloc_type base_type,
+			     int format,
+			     unsigned int field,
+			     int ignore ATTRIBUTE_UNUSED,
+			     asymbol *sym ATTRIBUTE_UNUSED)
 {
   elf_hppa_reloc_type *finaltype;
   elf_hppa_reloc_type **final_types;
--- a/bfd/elf32-hppa.h
+++ b/bfd/elf32-hppa.h
@@ -62,7 +62,7 @@ bool elf32_hppa_build_stubs
 elf_hppa_reloc_type elf32_hppa_reloc_final_type
   (bfd *, elf_hppa_reloc_type, int, unsigned int);
 
-extern elf_hppa_reloc_type ** _bfd_elf32_hppa_gen_reloc_type
+extern elf_hppa_reloc_type **bfd_elf32_hppa_gen_reloc_type
   (bfd *, elf_hppa_reloc_type, int, unsigned int, int, asymbol *);
 
 /* Define groups of basic relocations.  FIXME:  These should
--- a/bfd/elf64-hppa.h
+++ b/bfd/elf64-hppa.h
@@ -29,7 +29,7 @@
 extern elf_hppa_reloc_type elf64_hppa_reloc_final_type
   (bfd *, elf_hppa_reloc_type, int, unsigned int);
 
-extern elf_hppa_reloc_type ** _bfd_elf64_hppa_gen_reloc_type
+extern elf_hppa_reloc_type **bfd_elf64_hppa_gen_reloc_type
   (bfd *, elf_hppa_reloc_type, int, unsigned int, int, asymbol *);
 
 /* Define groups of basic relocations.  FIXME:  These should
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -54,10 +54,10 @@ typedef elf_symbol_type obj_symbol_type;
 
 #if TARGET_ARCH_SIZE == 64
 /* How to generate a relocation.  */
-#define hppa_gen_reloc_type _bfd_elf64_hppa_gen_reloc_type
+#define hppa_gen_reloc_type bfd_elf64_hppa_gen_reloc_type
 #define elf_hppa_reloc_final_type elf64_hppa_reloc_final_type
 #else
-#define hppa_gen_reloc_type _bfd_elf32_hppa_gen_reloc_type
+#define hppa_gen_reloc_type bfd_elf32_hppa_gen_reloc_type
 #define elf_hppa_reloc_final_type elf32_hppa_reloc_final_type
 #endif
 



More information about the Binutils mailing list