[PATCH v2 1/1] readelf: invalid error message triggered when last tag is an empty string
Matthieu Longo
matthieu.longo@arm.com
Mon Jun 23 12:56:37 GMT 2025
On 2025-06-23 12:07, Richard Earnshaw (lists) wrote:
> On 23/06/2025 10:48, Jan Beulich wrote:
>
>> (It's likely even wrong to call it for e.g.
>> section names, for the same reason.)
>>
>> Jan
>
> I think that's probably intended to handle cases like compiling C++ with -ffunction-sections. In that case you get things like:
>
> int f(int a) {
> return a + 1;
> }
>
> g++ -ffunction-sections -S -o - x.cc | grep .section
>
> .section .text._Z1fi,"ax",@progbits
>
> and really want to see that this is for f(int).
>
> It happens not to work though - I don't think the demangler can decode this when the leading ".text." is prepended to the section name.
>
> R
@Jan, @Richard:
Since it is not directly related to the issue addressed by the patch,
could we fix this another time ?
More information about the Binutils
mailing list