summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 3cf7b056064..b8c8891648a 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -2223,25 +2223,6 @@ template <class ELFT> void Writer<ELFT>::fixSectionAlignments() {
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);
- }
}
}
OpenPOWER on IntegriCloud