Commit: readelf: warn about local symbols outside of a mergeable section

Jan Beulich jbeulich@suse.com
Tue Dec 9 10:50:30 GMT 2025


On 09.12.2025 10:22, Nick Clifton wrote:
>>> Thanks for this.  I will go ahead and apply this change, along with
>>> my fix for avoiding mapping symbols.
>>
>> Do you really need to exclude mapping symbols?  That just looks wrong
>> to me.
> 
> I thought so too, but they were showing up in linker tests on AArch64 native
> builds so I added the check.
> 
> Besides, what exactly does it mean for mapping symbols to be assigned to a
> mergeable section ?  Is there any case where you would find both code and
> data in such a section ?

Code snippets, e.g. for approaches like Linux'es alternatives patching,
could easily be a mix of code and data, and they could also live in a
mergeable section.

Jan

>   I could not think of any scenario for this, but
> since it does happen I assumed that I was just missing something and so
> added the code to skip that kind of symbol.
> 
> Cheers
>    Nick
> 
> 



More information about the Binutils mailing list