(I took a while to recollect the discussion)
It should be more clear than that. See below.
> In reality, this isn't a real issue since all notes in one PT_LOAD segment
> must have the same alignment which equals to p_align.
p_align of PT_LOAD or PT_NOTE?
> Note parser
> can use p_align of PT_LOAD segment for note alignment,
Why not p_align of PT_NOTE? p_align of PT_LOAD seems to be (on my
Ubuntu) set to the 2MiB pagesize value.
> instead of
> assuming alignment based on ELF file class.
The gABI description of ELF class based alignment may be because gABI
does not talk anything about PT_NOTE actually being part of PT_LOAD.
PT_NOTE could be a separate segment on its own outside PT_LOAD, though
almost all implementations make it part of PT_LOAD.
> BTW, should we document that all notes in one PT_LOAD segment
> must have the same alignment which equals to p_align?
Why not p_align of PT_NOTE? And p_align of PT_NOTE may be set to the
maximum of all sh_addralign of all SHT_NOTE that make up the PT_NOTE.
--
Supra