This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: binutils ld and new PT_GNU_PROPERTY segment
On Wed, Feb 19, 2020 at 4:28 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Wed, Feb 19, 2020 at 4:02 AM Mark Wielaard <mark@klomp.org> wrote:
> >
> > Hi,
> >
> > On Wed, 2020-02-19 at 03:39 -0800, H.J. Lu wrote:
> > > On Wed, Feb 19, 2020 at 2:58 AM Mark Wielaard <mark@klomp.org> wrote:
> > > > On Tue, 2020-02-18 at 18:31 -0800, Fangrui Song wrote:
> > > > > From what I can see, neither the Linux kernel nor glibc uses
> > > > > PT_GNU_PROPERTY.
> > > > > glibc/sysdeps/x86/dl-prop.h parses PT_NOTE.
> > > >
> > > > That is my impression too.
> > >
> > > See:
> > >
> > > https://patchwork.kernel.org/patch/11285409/
> > >
> > > It is for both x86 and arm64.
> >
> > So that is not upstream in the mainline kernel? Why can't that patch
> > use the existing PT_NOTE segment? That would make it compatible with
> > existing binaries that don't have this PT_GNU_PROPERTY program header.
>
> Kernel loader is one of motivations of PT_GNU_PROPERTY. Kernel loader
> only wants to check PT_XXX.
>
This is one thread on kernel mailing list:
https://lore.kernel.org/lkml/87imt4jwpt.fsf@oldenburg2.str.redhat.com/
--
H.J.