[PATCH] D28272: ELF: Reserve space for copy relocations of read-only symbols in relro.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 13:17:52 PST 2017


Peter Collingbourne via Phabricator <reviews at reviews.llvm.org> writes:

> Relatedly, I discovered a bug in this patch. We can't use SHT_NOBITS for the new section because we need to lay out all NOBITS sections contiguously at the end of the LOAD. RELRO also needs to be contiguous (there can only be one RELRO header), so we can't have another RELRO covering part of the bss.

You could move the RELRO to the end of the regular RW PT_LOAD, no? That way it
will be just before the nobits sections and the nobits sections could
start with RELRO ones. That way the RELRO segment would span the end of
the regular (non-nobits) sections and the start of the nobits ones.

Cheers,
Rafael




More information about the llvm-commits mailing list