https://sourceware.org/bugzilla/show_bug.cgi?id=22914
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Cary Coutant from comment #1) > HJ, > > The linux-abi document leaves a few things unspecified: > > - Is the .note.gnu.property section SHF_ALLOC or not? It is no different from other SHT_NOTE sections. > - Does it go in the PT_NOTE segment? Should it be placed at the > beginning of the segment? If it has SHF_ALLOC, it should go into the PT_NOTE segment. > - It says the .note.gnu.property section may be combined with other > note sections. (Is that true, or is it missing a "not"?) If the linker > combines it with other SHT_NOTE sections, does the name matter at all? It isn't strictly required. It is just another special section. > - Does the linker key off the name of the section, or does it need to > parse all SHT_NOTE sections looking for NT_GNU_PROPERTY_TYPE_0 and > "GNU"? (Neither option is attractive -- I'd much prefer using a custom > section type and program header type, like ARM, MIPS, and Itanium do > for their attributes sections. The linker and loader aren't meant to > be parsing note sections.) Linker and loader need to look for NT_GNU_PROPERTY_TYPE_0 and "GNU", similar to other "GNU" note sections. > - Where did we end up with note section alignment for 64-bit objects? > Is it still 4-byte aligned? No, as documented in linux gABI: 2.1.7 Alignment of Note Sections All entries in a PT_NOTE segment have the same alignment which equals to the p_align field in program header. According to gABI, each note entry should be aligned to 4 bytes in 32-bit objects or 8 bytes in 64-bit objects. But .note.ABI-tag section (see Section 2.1.6) and .note.gnu.build-id section (see Section 2.1.4) are aligned to 4 bytes in both 32-bit and 64-bit objects. Note parser should use p_align for note alignment, instead of assuming alignment based on ELF file class. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils