This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binutils ld and new PT_GNU_PROPERTY segment


On Thu, Feb 20, 2020 at 1:37 AM Mark Wielaard <mark@klomp.org> wrote:
>
> 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.
>

Kernel loader only checks ld.so and static executable.  Re-link them with
newer linker will get PT_GNU_PROPERTY.  But ld.so needs to check
PT_NOTE for older binaries.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]