[PATCH v2 26/28] gnu directives: bfd: detect "gnu" namespace as a public subsection
Matthieu Longo
matthieu.longo@arm.com
Wed May 7 16:25:17 GMT 2025
On 2025-05-02 14:59, Jan Beulich wrote:
> 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
>
I will merge this patch with 23/28 in the next revision.
More information about the Binutils
mailing list