[PATCH] D64854: [ELF] Delete redundant pageAlign at PT_GNU_RELRO boundaries after D58892
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 02:26:06 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL366307: [ELF] Delete redundant pageAlign at PT_GNU_RELRO boundaries after D58892 (authored by MaskRay, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D64854?vs=210271&id=210274#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64854/new/
https://reviews.llvm.org/D64854
Files:
lld/trunk/ELF/Writer.cpp
Index: lld/trunk/ELF/Writer.cpp
===================================================================
--- lld/trunk/ELF/Writer.cpp
+++ lld/trunk/ELF/Writer.cpp
@@ -2223,25 +2223,6 @@
for (const PhdrEntry *p : part.phdrs)
if (p->p_type == PT_LOAD && p->firstSec)
pageAlign(p->firstSec);
-
- for (const PhdrEntry *p : part.phdrs) {
- if (p->p_type != PT_GNU_RELRO)
- continue;
-
- if (p->firstSec)
- pageAlign(p->firstSec);
-
- // Find the first section after PT_GNU_RELRO. If it is in a PT_LOAD we
- // have to align it to a page.
- auto end = outputSections.end();
- auto i = llvm::find(outputSections, p->lastSec);
- if (i == end || (i + 1) == end)
- continue;
-
- OutputSection *cmd = (*(i + 1));
- if (needsPtLoad(cmd))
- pageAlign(cmd);
- }
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64854.210274.patch
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190717/9f1a575b/attachment-0001.bin>
More information about the llvm-commits
mailing list