[ELF] Give error message when relro sections are 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. Differential Revision: https://reviews.llvm.org/D40359 [ELF] Skip over empty sections when checking for contiguous relro llvm-svn: 318920
Loading
Please sign in to comment