[binutils-gdb] bfd/ELF: properly mark bfd_elf_print_symbol() as private

Jan Beulich jbeulich@sourceware.org
Fri Nov 7 13:59:46 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=479613f261ce7bf7216a4e7a9d91c12ea0e21479

commit 479613f261ce7bf7216a4e7a9d91c12ea0e21479
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Nov 7 14:57:01 2025 +0100

    bfd/ELF: properly mark bfd_elf_print_symbol() as private
    
    Add a leading underscore and make it hidden.

Diff:
---
 bfd/elf-bfd.h      | 4 ++--
 bfd/elf.c          | 8 ++++----
 bfd/elfxx-target.h | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index a7625e52c04..010a70edff8 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2316,8 +2316,8 @@ extern bool _bfd_elf_print_private_bfd_data
   (bfd *, void *) ATTRIBUTE_HIDDEN;
 const char * _bfd_elf_get_symbol_version_string
   (bfd *, asymbol *, bool, bool *) ATTRIBUTE_HIDDEN;
-extern void bfd_elf_print_symbol
-  (bfd *, void *, asymbol *, bfd_print_symbol_type);
+extern void _bfd_elf_print_symbol
+  (bfd *, void *, asymbol *, bfd_print_symbol_type) ATTRIBUTE_HIDDEN;
 
 extern unsigned int _bfd_elf_eh_frame_address_size
   (bfd *, const asection *) ATTRIBUTE_HIDDEN;
diff --git a/bfd/elf.c b/bfd/elf.c
index 0be4e13b355..36bc2507b4a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2397,10 +2397,10 @@ _bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol,
 /* Display ELF-specific fields of a symbol.  */
 
 void
-bfd_elf_print_symbol (bfd *abfd,
-		      void *filep,
-		      asymbol *symbol,
-		      bfd_print_symbol_type how)
+_bfd_elf_print_symbol (bfd *abfd,
+		       void *filep,
+		       asymbol *symbol,
+		       bfd_print_symbol_type how)
 {
   FILE *file = (FILE *) filep;
   const char *symname = (symbol->name != bfd_symbol_error_name
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 5ae98b5ecc1..27b07c9b1c4 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -340,7 +340,7 @@
 #endif
 
 #ifndef bfd_elfNN_print_symbol
-#define bfd_elfNN_print_symbol bfd_elf_print_symbol
+#define bfd_elfNN_print_symbol _bfd_elf_print_symbol
 #endif
 
 #ifndef elf_symbol_leading_char


More information about the Binutils-cvs mailing list