During PHDR creation, the case where an output section does not require a
PT_LOAD header but still occupies memory in the current VMA region was not handled.
If such an output section interleaves two output sections that have the same
VMA and LMA regions set, we would previously re-use the existing PT_LOAD header
for the second output section.
However, since the memory region is not contiguous, we need to start a new PT_LOAD
segment.
This fixes https://bugs.llvm.org/show_bug.cgi?id=50558
Independent from this change, GNU ld assigns WA section flags to output sections defined as
, while ld.lld assigns A. Is this intended?
This has also an effect on the number of program headers we create. In the test, the bss section has WA
flags, thus getting its own header.