[PATCH v2 24/28] gnu directives: readelf detects "gnu" as public subsection

Matthieu Longo matthieu.longo@arm.com
Wed May 7 16:24:09 GMT 2025


On 2025-05-02 14:54, Jan Beulich wrote:
> On 02.05.2025 12:32, Matthieu Longo wrote:
>> ---
>>   binutils/readelf.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/binutils/readelf.c b/binutils/readelf.c
>> index f18f3527387..7aadeaea74a 100644
>> --- a/binutils/readelf.c
>> +++ b/binutils/readelf.c
>> @@ -19645,7 +19645,9 @@ elf_parse_attrs_subsection_v2 (unsigned char *cursor,
>>         const char *subsec_name = (const char *) cursor;
>>         printf (_(" - Name:	%s\n"), subsec_name);
>>         bool public_subsection =
>> -	strncmp (subsec_name, public_name, strlen (public_name)) == 0;
>> +	strncmp (subsec_name, public_name, strlen (public_name)) == 0
>> +	|| (strncmp (subsec_name, "gnu", 3) == 0
>> +	    && strncmp (subsec_name + 3, "-testing", 8) != 0);
> 
> All of my lack of understanding here aside - how do these two comparisons
> fit with the patch title (and the absence of any description)?
> 
> Jan

I will merge this patch with the previous one, and update the 
description. Splitting them is not a good idea.


More information about the Binutils mailing list