PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold

Michael Matz matz@suse.de
Thu Aug 23 14:42:00 GMT 2018


Hi,

On Wed, 22 Aug 2018, Florian Weimer wrote:

> glibc 2.28 assumes that no 4-byte-aligned PT_NOTE segments contain GNU 
> property notes and will search for such notes in 8-byte aligned segments 
> only. The glibc changes were formally reviewed and checked for 
> interoperability with BFD ld.  I think we have (had) community consensus 
> for them.

Not really.  You had one person favoring 8byte alignment (variously 
because the gABI says so, even though that's irrelevant for .gnu.note, 
and/or because then int64 accesses can be used without having to write a 
read_int64 macro that deals with unalignment), and the rest either 
ignoring this or saying "ugh, bad idea, breaks compatibility and breaks 
forward compat because not self-describing anymore".  The former put in 
work to implement 8byte alignment, ignoring the compat issues.  Now you 
actually see those issues.  Everybody looses.  That's what you get if 
people create facts before consensus.


Ciao,
Michael.



More information about the Binutils mailing list