This is patch 1 of 3 spun out from D40029 covering : Give an error if relro is not contiguous.
If a linker script is used that names linker generated synthetic sections it is possible that the OutputSections for which isRelroSection() is true are not contiguous. When the relro sections are not contiguous we cannot describe them with a single PT_GNU_RELRO PHDR. Unfortunately at least one contemporary dynamic loader only supports one PT_GNU_RELRO PHDR so we cannot output more than one of these PHDRs. As not including relro sections in the PHDR will lead to security sensitive sections being
writeable we choose to give an error message instead.
Patches 2 and 3 will cover:
- Relax handling of empty sections.
- Name change when linker scripts are used.