[ELF] Use MaxPageSize for aligning PT_LOAD
authorPetr Hosek <phosek@chromium.org>
Wed, 28 Sep 2016 00:09:20 +0000 (00:09 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 28 Sep 2016 00:09:20 +0000 (00:09 +0000)
commit5d98fef75d0ca127a50437ef20ca391bd1c51c97
tree957e9b3893745aa04d367a68b6fe22bacf6ee26e
parentc507ac96f5bf6a22890e9459e9cebe8ba81949cd
[ELF] Use MaxPageSize for aligning PT_LOAD

This matches the behavior of Binutils linkers. We also change the
default MaxPageSize on x86-64 to 0x1000 to preserver the current
behavior, which is the same as the behavior implemented by gold.

https://llvm.org/bugs/show_bug.cgi?id=30541

Differential Revision: https://reviews.llvm.org/D24987

llvm-svn: 282560
lld/ELF/Driver.cpp
lld/ELF/Target.cpp
lld/ELF/Writer.cpp
lld/test/ELF/linkerscript/data-segment-relro.s
lld/test/ELF/linkerscript/locationcounter.s
lld/test/ELF/linkerscript/outsections-addr.s
lld/test/ELF/linkerscript/symbol-assignexpr.s