This is the mail archive of the
mailing list for the binutils project.
Re: RFC: Alignment and sizes of .note.ABI-tag and .note.gnu.build-id in 64-bit ELF objects
- From: Nicholas Miell <nmiell at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, Binutils <binutils at sourceware dot org>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 31 Mar 2017 13:30:31 -0700
- Subject: Re: RFC: Alignment and sizes of .note.ABI-tag and .note.gnu.build-id in 64-bit ELF objects
- Authentication-results: sourceware.org; auth=none
- Newsgroups: gmane.comp.gnu.binutils, gmane.comp.lib.glibc.alpha
- References: <CAMe9rOrnxJeW7ef8yZ3QZ5RA5ktjFmu9c1QW79w=pfs6wiOemw@mail.gmail.com>
On 03/31/2017 10:17 AM, H.J. Lu wrote:
According to gABI, in 64-bit objects, each note entry is an array of 8-bye
words in the format of the target processor. But I got
[ 2] .note.ABI-tag NOTE 0000000000000254 000254
000020 00 A 0 0 4
[ 3] .note.gnu.build-id NOTE 0000000000000274 000274
000024 00 A 0 0 4
on x86-64. .note.ABI-tag size is 32, but it isn't aligned at 8 bytes.
.note.gnu.build-id size is 36, which isn't multiple of 8 bytes. Should
they be padded to multiple of 8 bytes and aligned to 8 bytes for 64-bit
The spec is wrong, ELF notes are always arrays of 4-byte words in the
format of the target processor.