This is the mail archive of the mailing list for the glibc 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: PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold

On Thu, Aug 16, 2018 at 12:16 PM, Mark Wielaard <> wrote:
> On Thu, Aug 16, 2018 at 04:21:05PM +0200, Florian Weimer wrote:
>> On 08/16/2018 03:39 PM, H.J. Lu wrote:
>> > glibc only discards 4-byte aligned NT_GNU_PROPERTY_TYPE_0 note
>> > since NT_GNU_PROPERTY_TYPE_0 note follows gABI.  If gold
>> > generates 4 byte alignment, it is a gold bug.
>> I filed:
> I don't think this is a bug in gold, but one in ld:
> In the GNU abi all ELF Notes are arrays of 32bit words
> (and so 4-byte aligned). This is the same for most other

That is not true.  NT_GNU_PROPERTY_TYPE_0 note is
8 byte aligned in 64-bit ELF.

> ELF systems. Making the ELF Notes fields 64bit words (and
> so 8-byte aligned) in ELFCLASS64 would indeed be what gabi
> literally says, but not what GNU systems, and others, follow.
> Having a mix of 4-byte words and 8-byte words ELF Notes
> in the same ELF file seems unnecessarily confusing and
> introduces extra segments and sections.
> Cheers,
> Mark


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