This is the mail archive of the libc-alpha@sourceware.org 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: [PATCH] Replace ROUND with ALIGN_UP by p_align [BZ #22370]


On Sat, Nov 11, 2017 at 9:05 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Nov 11 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>
>> If .note.ABI-tag and .note.gnu.build-id notes followed the gABI, they should
>> have been aligned to 8 bytes in 64-bit objects and we could have assumed
>> all notes in PT_NOTE segments in 64-bit objects are aligned to 8 bytes.  But
>> .note.ABI-tag and .note.gnu.build-id notes don't follow the gABI.
>
> How comes this has always been working?
>

Before

commit 62753d2c09108550650ab83a69e99ca28d8bde3b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Aug 18 08:49:07 2017 -0700

    Add NT_GNU_PROPERTY_TYPE_0 macros

    Add macros used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0).

            * elf/elf.h (NT_GNU_PROPERTY_TYPE_0): New.
            (NOTE_GNU_PROPERTY_SECTION_NAME): Likewise.

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.  My patch fixes glibc so that it can parse GNU notes
aligned to either
4 bytes or 8 bytes.


-- 
H.J.


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