summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/ReaderWriter/ELF/SegmentChunks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/ELF/SegmentChunks.cpp b/lld/lib/ReaderWriter/ELF/SegmentChunks.cpp
index aff9668f884..93f2ce4c179 100644
--- a/lld/lib/ReaderWriter/ELF/SegmentChunks.cpp
+++ b/lld/lib/ReaderWriter/ELF/SegmentChunks.cpp
@@ -200,7 +200,7 @@ template <class ELFT> void Segment<ELFT>::assignVirtualAddress(uint64_t addr) {
// Align to a page only if the output is not
// OutputMagic::NMAGIC/OutputMagic::OMAGIC
startAddr = llvm::RoundUpToAlignment(startAddr, this->_ctx.getPageSize());
- } else if (!isDataPageAlignedForNMagic && needAlign(*si)) {
+ } else if (needAlign(*si)) {
// If the linker outputmagic is set to OutputMagic::NMAGIC, align the
// Data to a page boundary.
startAddr = llvm::RoundUpToAlignment(startAddr, this->_ctx.getPageSize());
OpenPOWER on IntegriCloud