Index: ELF/Writer.cpp =================================================================== --- ELF/Writer.cpp +++ ELF/Writer.cpp @@ -2230,17 +2230,6 @@ 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); } } }