[lld] r234955 - ELF: Attempt to simplify Segment::AssignVirtualAddress.

Rui Ueyama ruiu at google.com
Tue Apr 14 16:11:14 PDT 2015


Author: ruiu
Date: Tue Apr 14 18:11:14 2015
New Revision: 234955

URL: http://llvm.org/viewvc/llvm-project?rev=234955&view=rev
Log:
ELF: Attempt to simplify Segment::AssignVirtualAddress.

This is a retry of r234944.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.cpp

Modified: lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.cpp?rev=234955&r1=234954&r2=234955&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.cpp Tue Apr 14 18:11:14 2015
@@ -200,7 +200,7 @@ template <class ELFT> void Segment<ELFT>
       // 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());





More information about the llvm-commits mailing list