This matches the behavior of Binutils linkers. We also change the default MaxPageSize on x86-64 to 0x1000 to preserve the current behavior, which is the same as the behavior implemented by gold.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
The question is whether it wouldn't also make more sense to rename MaxPageSize and PageSize to something more descriptive/less confusing, e.g. gold uses abi_pagesize (for MaxPageSize) and common_pagesize (for PageSize) which IMHO makes more sense.
This change broke linking the FreeBSD kernel with lld, which relies on MAXPAGESIZE to set the kernel's phys addr. See https://svnweb.freebsd.org/base/head/sys/conf/ldscript.amd64?revision=303442&view=markup#l9
I'm not sure what's the best solution here; we could add -zmax-page-size to the FreeBSD kernel build, but I'm not sure we want to diverge from ld.bfd. For now I'm testing with a change to set x86 MaxPageSize back to 0x200000.
The FreeBSD kernel build breakage after this change is tracked in http://llvm.org/pr30891.