Why should the loader have to go parsing everything in a generic PT_NOTE
segment anyway?
With 8-byte alignment, in practice, it is currently quite fast to discover
the new notes because the other notes have 4-byte alignment, so the PT_NOTE
segment with the property notes should be pleasantly short.
I understand the benefit of having a PT_NOTE segment containing
nothing but the one note, and this is certainly expedient, but it's
quite ugly and, I think, fragile. This really underscores the value of
defining a bespoke segment type for this one purpose.
How difficult would it be for glibc if the linker would consume the
existing .note.gnu.property sections, then generate an output section
with the same format (maybe minus the SHT_NOTE overhead), but using a
new section type in its own new segment type? You could continue to
look for 8-byte aligned legacy PT_NOTE segments, but could also look
for the new PT_GNU_PROPERTY segment.