PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold (was: Re: [PATCH] Document GNU_PROPERTY_X86_ISA_1_[USED|NEEDED])

Florian Weimer fweimer@redhat.com
Thu Aug 16 13:00:00 GMT 2018


On 08/07/2018 10:41 PM, H.J. Lu wrote:
> The .note.gnu.property section with NT_GNU_PROPERTY_TYPE_0 has been
> added to Linux Extensions to gABI:
> 
> https://github.com/hjl-tools/linux-abi
> 
> GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED are
> processor-specific program property types for i386 and x86-64.

The specification is incomplete as far as alignment matters are concerned.

Is the link editor supposed to maintain separate segments for notes with 
different alignments?  Or is it possible to merge the notes into a 
single segment, potentially after adjusting alignment?

Is the link editor *required* to produce 8-byte alignment for notes in 
ELFCLASS64 objects?

Currently, we do not have agreement between binutils (particularly gold) 
and the glibc dynamic loader when it comes to alignment of PT_NOTE 
segments.  glibc will disregard property notes in ELFCLASS64 objects 
which have 4-byte alignment, but gold produces such notes.  This needs 
to be fixed.

Thanks,
Florian



More information about the Binutils mailing list