This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: RFC: Alignment and sizes of .note.ABI-tag and .note.gnu.build-id in 64-bit ELF objects


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
objects?


The spec is wrong, ELF notes are always arrays of 4-byte words in the format of the target processor.


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