This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Replace ROUND with ALIGN_UP by p_align [BZ #22370]
On Sun, Nov 12, 2017 at 5:51 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Nov 11 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>
>> glibc never saw other notes. .note.gnu.property note uses the same GNU note
>> format as .note.ABI-tag and .note.gnu.build-id notes, but it is
>> aligned to 8 bytes in
>> 64-bit objects.
>
> Wouldn't it be better for .note.gnu.property to follow existing
> practice? It seems like everyone assumes word alignment for notes.
.note.gnu.property supports address/size related properties, which are
64 bits in 64-bit objects. It is natural to follow the gABI.
> Also note that Elf64_Nhdr consists of odd number of words, which makes
> the note data unaligned for xwords, causing the next note to be
> unaligned relative to the segment alignment.
>
Data after Elf64_Nhdr is the "name" field which is a 4-byte string, "GNU".
There is no misalignment. The .note.gnu.property note is designed in
such a way that properties can be 64 bits without misalignment in 64-bit
objects:
https://sourceware.org/ml/gnu-gabi/2016-q4/msg00000.html
--
H.J.