[PATCH v2 26/28] gnu directives: bfd: detect "gnu" namespace as a public subsection
Jan Beulich
jbeulich@suse.com
Fri May 2 13:59:15 GMT 2025
On 02.05.2025 12:32, Matthieu Longo wrote:
> ---
> bfd/elf-attrs.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c
> index 73bd0d93fdc..0df746872f0 100644
> --- a/bfd/elf-attrs.c
> +++ b/bfd/elf-attrs.c
> @@ -2408,10 +2408,11 @@ bfd_elf_parse_attrs_subsection_v2 (bfd *abfd,
> }
>
> const char *vendor_name = get_elf_backend_data (abfd)->obj_attrs_vendor;
> - obj_attr_subsection_scope_v2 scope =
> - (strncmp (subsection_name, vendor_name, strlen (vendor_name)) == 0)
> - ? OA_SUBSEC_PUBLIC
> - : OA_SUBSEC_PRIVATE;
> + obj_attr_subsection_scope_v2 scope = OA_SUBSEC_PRIVATE;
> + if (strncmp (subsection_name, vendor_name, strlen (vendor_name)) == 0
> + || (strncmp (subsection_name, "gnu", 3) == 0
> + && strncmp (subsection_name + 3, "-testing", 8) != 0))
> + scope = OA_SUBSEC_PUBLIC;
Same remark here as on patch 24.
Jan
More information about the Binutils
mailing list