]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/XCOFF: mark internal data hidden
authorJan Beulich <jbeulich@suse.com>
Fri, 21 Nov 2025 08:05:02 +0000 (09:05 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 21 Nov 2025 08:05:02 +0000 (09:05 +0100)
This reduces the dynamic symbol table a bit (about a dozen symbols) and
allows the compiler to be more aggressive about inlining (as it sees fit,
of course).

bfd/libxcoff.h

index 2889337596983cd683f24a71b7f64d60a001fb86..ee27e0a1fa55ba43f0e1e41313b916fdf25cb000 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef LIBXCOFF_H
 #define LIBXCOFF_H
 
+#include "hidden.h"
+
 /* This is the backend information kept for XCOFF files.  This
    structure is constant for a particular backend.  The first element
    is the COFF backend data structure, so that XCOFF targets can use
@@ -235,21 +237,23 @@ typedef bool xcoff_reloc_function (bfd *, asection *, bfd *,
 typedef bool xcoff_complain_function (bfd *, bfd_vma, bfd_vma,
                                             struct reloc_howto_struct *);
 
-extern xcoff_reloc_function *const xcoff_calculate_relocation[];
-extern xcoff_complain_function *const xcoff_complain_overflow[];
+extern xcoff_reloc_function *const xcoff_calculate_relocation[]
+  ATTRIBUTE_HIDDEN;
+extern xcoff_complain_function *const xcoff_complain_overflow[]
+  ATTRIBUTE_HIDDEN;
 
 #define XCOFF_NO_LONG_SECTION_NAMES  (false), bfd_coff_set_long_section_names_disallowed
 
 /* Relocation functions */
-extern xcoff_reloc_function xcoff_reloc_type_noop;
-extern xcoff_reloc_function xcoff_reloc_type_fail;
-extern xcoff_reloc_function xcoff_reloc_type_pos;
-extern xcoff_reloc_function xcoff_reloc_type_neg;
-extern xcoff_reloc_function xcoff_reloc_type_rel;
-extern xcoff_reloc_function xcoff_reloc_type_toc;
-extern xcoff_reloc_function xcoff_reloc_type_ba;
-extern xcoff_reloc_function xcoff_reloc_type_crel;
-extern xcoff_reloc_function xcoff_reloc_type_tls;
+extern xcoff_reloc_function xcoff_reloc_type_noop ATTRIBUTE_HIDDEN;
+extern xcoff_reloc_function xcoff_reloc_type_fail ATTRIBUTE_HIDDEN;
+extern xcoff_reloc_function xcoff_reloc_type_pos ATTRIBUTE_HIDDEN;
+extern xcoff_reloc_function xcoff_reloc_type_neg ATTRIBUTE_HIDDEN;
+extern xcoff_reloc_function xcoff_reloc_type_rel ATTRIBUTE_HIDDEN;
+extern xcoff_reloc_function xcoff_reloc_type_toc ATTRIBUTE_HIDDEN;
+extern xcoff_reloc_function xcoff_reloc_type_ba ATTRIBUTE_HIDDEN;
+extern xcoff_reloc_function xcoff_reloc_type_crel ATTRIBUTE_HIDDEN;
+extern xcoff_reloc_function xcoff_reloc_type_tls ATTRIBUTE_HIDDEN;
 
 /* Structure to describe dwarf sections.
    Useful to convert from XCOFF section name to flag and vice-versa.