[PATCH 11/27] bfd/ELF: mark internal RISC-V functions hidden
Nelson Chu
nelson@rivosinc.com
Tue Oct 28 04:18:26 GMT 2025
Okay, please commit.
Thanks
Nelson
On Mon, Oct 27, 2025 at 10:14 PM Jan Beulich <jbeulich@suse.com> wrote:
> This reduces the dynamic symbol table a little and allows the compiler to
> be more aggressive about inlining (as it sees fit, of course).
>
> --- a/bfd/elfxx-riscv.h
> +++ b/bfd/elfxx-riscv.h
> @@ -47,13 +47,13 @@ extern void riscv_elf64_set_options (str
> struct riscv_elf_params *);
>
> extern reloc_howto_type *
> -riscv_reloc_name_lookup (bfd *, const char *);
> +riscv_reloc_name_lookup (bfd *, const char *) ATTRIBUTE_HIDDEN;
>
> extern reloc_howto_type *
> -riscv_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
> +riscv_reloc_type_lookup (bfd *, bfd_reloc_code_real_type)
> ATTRIBUTE_HIDDEN;
>
> extern reloc_howto_type *
> -riscv_elf_rtype_to_howto (bfd *, unsigned int r_type);
> +riscv_elf_rtype_to_howto (bfd *, unsigned int r_type) ATTRIBUTE_HIDDEN;
>
> /* The information of architecture attribute. */
> struct riscv_subset_t
> @@ -79,12 +79,12 @@ riscv_release_subset_list (riscv_subset_
> extern void
> riscv_add_subset (riscv_subset_list_t *,
> const char *,
> - int, int);
> + int, int) ATTRIBUTE_HIDDEN;
>
> extern bool
> riscv_lookup_subset (const riscv_subset_list_t *,
> const char *,
> - riscv_subset_t **);
> + riscv_subset_t **) ATTRIBUTE_HIDDEN;
>
> typedef struct
> {
> @@ -107,10 +107,10 @@ extern char *
> riscv_arch_str (unsigned, riscv_subset_list_t *, bool);
>
> extern size_t
> -riscv_estimate_digit (unsigned);
> +riscv_estimate_digit (unsigned) ATTRIBUTE_HIDDEN;
>
> extern int
> -riscv_compare_subsets (const char *, const char *);
> +riscv_compare_subsets (const char *, const char *) ATTRIBUTE_HIDDEN;
>
> extern riscv_subset_list_t *
> riscv_copy_subset_list (riscv_subset_list_t *);
> @@ -139,14 +139,14 @@ extern void
> bfd_elf64_riscv_set_data_segment_info (struct bfd_link_info *, int *);
>
> extern bfd *
> -_bfd_riscv_elf_link_setup_gnu_properties (struct bfd_link_info *,
> uint32_t *);
> +_bfd_riscv_elf_link_setup_gnu_properties (struct bfd_link_info *,
> uint32_t *) ATTRIBUTE_HIDDEN;
>
> extern enum elf_property_kind
> _bfd_riscv_elf_parse_gnu_properties (bfd *, unsigned int, bfd_byte *,
> - unsigned int);
> + unsigned int) ATTRIBUTE_HIDDEN;
>
> extern bool
> _bfd_riscv_elf_merge_gnu_properties (struct bfd_link_info *, bfd *,
> - elf_property *, elf_property *,
> uint32_t);
> + elf_property *, elf_property *,
> uint32_t) ATTRIBUTE_HIDDEN;
>
> #define elf_backend_parse_gnu_properties
> _bfd_riscv_elf_parse_gnu_properties
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20251028/f22ee990/attachment.htm>
More information about the Binutils
mailing list