From a37deb529ed87593eae7c802df0d7daaab0706ad Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 21 Nov 2025 09:04:15 +0100 Subject: [PATCH] bfd/COFF: properly mark bfd_coff_{gc_sections,group_name}() as private Add an underscore prefix and make them hidden. --- bfd/coffcode.h | 4 ++-- bfd/coffgen.c | 4 ++-- bfd/libcoff-in.h | 8 ++++---- bfd/libcoff.h | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bfd/coffcode.h b/bfd/coffcode.h index ce1e39131b4..81ba944b168 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -6017,7 +6017,7 @@ static const bfd_coff_backend_data bigobj_swap_table = #endif #ifndef coff_bfd_gc_sections -#define coff_bfd_gc_sections bfd_coff_gc_sections +#define coff_bfd_gc_sections _bfd_coff_gc_sections #endif #ifndef coff_bfd_lookup_section_flags @@ -6029,7 +6029,7 @@ static const bfd_coff_backend_data bigobj_swap_table = #endif #ifndef coff_bfd_group_name -#define coff_bfd_group_name bfd_coff_group_name +#define coff_bfd_group_name _bfd_coff_group_name #endif #ifndef coff_bfd_discard_group diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 071ca0d133c..a851a22c22e 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -3246,7 +3246,7 @@ _bfd_coff_gc_keep (struct bfd_link_info *info) /* Do mark and sweep of unused sections. */ bool -bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) +_bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { bfd *sub; @@ -3296,7 +3296,7 @@ bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) /* Return name used to identify a comdat group. */ const char * -bfd_coff_group_name (bfd *abfd, const asection *sec) +_bfd_coff_group_name (bfd *abfd, const asection *sec) { struct coff_comdat_info *ci = bfd_coff_get_comdat_section (abfd, sec); if (ci != NULL) diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h index d7efcffffa8..88f5760b542 100644 --- a/bfd/libcoff-in.h +++ b/bfd/libcoff-in.h @@ -641,10 +641,10 @@ extern bool _bfd_coff_link_input_bfd extern bool _bfd_coff_reloc_link_order (bfd *, struct coff_final_link_info *, asection *, struct bfd_link_order *) ATTRIBUTE_HIDDEN; -extern bool bfd_coff_gc_sections - (bfd *, struct bfd_link_info *); -extern const char *bfd_coff_group_name - (bfd *, const asection *); +extern bool _bfd_coff_gc_sections + (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; +extern const char *_bfd_coff_group_name + (bfd *, const asection *) ATTRIBUTE_HIDDEN; /* Functions in xcofflink.c. */ diff --git a/bfd/libcoff.h b/bfd/libcoff.h index 9d9ee18de40..d2d550174da 100644 --- a/bfd/libcoff.h +++ b/bfd/libcoff.h @@ -645,10 +645,10 @@ extern bool _bfd_coff_link_input_bfd extern bool _bfd_coff_reloc_link_order (bfd *, struct coff_final_link_info *, asection *, struct bfd_link_order *) ATTRIBUTE_HIDDEN; -extern bool bfd_coff_gc_sections - (bfd *, struct bfd_link_info *); -extern const char *bfd_coff_group_name - (bfd *, const asection *); +extern bool _bfd_coff_gc_sections + (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; +extern const char *_bfd_coff_group_name + (bfd *, const asection *) ATTRIBUTE_HIDDEN; /* Functions in xcofflink.c. */ -- 2.47.3