Skip to content
Commit dc3bd88b authored by Peter Smith's avatar Peter Smith
Browse files

[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
parent 2365c781
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment