Right now note sections that are next to each other are put into the same. PT_NOTE program header. This produces an issue when alignments are not accounted for. This change produces exactly one PT_NOTE per SHT_NOTE section.
See https://reviews.llvm.org/D59120 and the email thread for associated discussion. The long and short of it is that we have to have more than one PT_NOTE segment to account for alignment of headers. This change maintains order while adding as few headers as is required (unless I got my math wrong) but we could yet further reduce the number of segments by sorting the OutputSections in order of decreasing alignment (as I proposed before but was shown to be wrong as a complete solution).
Would OneProgramHeaderPerNoteSection , or MultiNoteSegmentLayout be more descriptive? Which one is more simple is a bit subjective, and means having to read the comment or code to work out what it means in practice.