[lld] [ELF] Align the end of PT_GNU_RELRO associated PT_LOAD to a common-page-size boundary (PR #66042)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 13 11:47:02 PDT 2023
================
@@ -920,7 +929,9 @@ static unsigned getSectionRank(const OutputSection &osec) {
// TLS sections directly before the other RELRO sections.
if (!(osec.flags & SHF_TLS))
rank |= RF_NOT_TLS;
- if (!isRelroSection(&osec))
+ if (isRelroSection(&osec))
+ osec.relro = true;
----------------
smithp35 wrote:
IIUC this was previously used for sections between DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END. With it being cleared if there is no DATA_SEGMENT_RELRO_END. Wouldn't this unconditionally add it back in again even if there was no DATA_SEGMENT_RELRO_END?
https://github.com/llvm/llvm-project/pull/66042
More information about the llvm-commits
mailing list