binutils ld and new PT_GNU_PROPERTY segment

Mark Wielaard mark@klomp.org
Thu Feb 20 09:37:00 GMT 2020


Hi,

On Wed, 2020-02-19 at 14:17 -0800, H.J. Lu wrote:
> On Wed, Feb 19, 2020 at 1:46 PM Mark Wielaard <mark@klomp.org> wrote:
> > This code isn't in the kernel yet. So either it gets changed to use the
> > existing scheme with gnu property notes found through PT_NOTE to work
> > with existing binaries. Then there is no need for PT_GNU_PROPERTY
> > headers.
> > 
> > Or some future kernel will start using PT_GNU_PROPERTY headers to find
> > the gnu property notes. But that means it won't work with existing
> > binaries that do not have that header. So there is no backwards
> > compatibility anyway and we can define SHT_GNU_PROPERTY like above.
> > 
> > So this actually seems the perfect time to make this decision.
> 
> Binaries with .note.gnu.property section have been put into many
> OS releases.  We must support them.

OK. Then it is option 1. The kernel will need to support PT_NOTE for
parsing the properties, since such older binaries won't have a
PT_GNU_PROPERTY program header. Then we can simply get rid of
PT_GNU_PROPERTY since nobody uses it and all information is already
available through the PT_NOTE segment.

Cheers,

Mark



More information about the Binutils mailing list