This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold
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: https://sourceware.org/bugzilla/show_bug.cgi?id=23535
I don't think this is a bug in gold, but one in ld:
https://sourceware.org/bugzilla/show_bug.cgi?id=22749
In the GNU abi all ELF Notes are arrays of 32bit words
(and so 4-byte aligned). This is the same for most other
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
- References:
- PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold (was: Re: [PATCH] Document GNU_PROPERTY_X86_ISA_1_[USED|NEEDED])
- Re: PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold (was: Re: [PATCH] Document GNU_PROPERTY_X86_ISA_1_[USED|NEEDED])
- Re: PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold
- Re: PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold
- Re: PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold