[PATCH] Support SHF_GNU_RETAIN ELF section flag

Jozef Lawrynowicz jozef.l@mittosystems.com
Wed Sep 23 16:54:09 GMT 2020


On Wed, Sep 23, 2020 at 11:29:05PM +0930, Alan Modra via Binutils wrote:
> On Wed, Sep 23, 2020 at 01:13:48PM +0100, Jozef Lawrynowicz wrote:
> > Attached a revised patch:
> > - Removed mmix-*-* XFAILs
> > - Fixed SHF_GNU_RETAIN being clobbered when using the .section directive
> >   without the "R" flag, after the section has previously been marked
> >   with SHF_GNU_RETAIN. Added tests for this behavior.
> 
> In my quick scan over your patch, I didn't see anything that would set
> ELFOSABI_GNU.  Since SHF_GNU_RETAIN is in the SHF_MASKOS range,
> generating sections with the flag set should also set OSABI, and
> if an object has the wrong OSABI you can't interpret that bit as
> SHF_GNU_RETAIN.  See has_gnu_osabi for the way this is handled in
> bfd.

Ah yes, I'll fix that.

Thanks,
Jozef


More information about the Binutils mailing list