[ELF][ARM] Increase default max-page-size from 4096 to 6536
commit87383e408d41623ada41e2bbc371b037fa29e894
authorTobias Hieta <tobias@hieta.se>
Sat, 18 Apr 2020 15:06:37 +0000 (18 08:06 -0700)
committerFangrui Song <maskray@google.com>
Sat, 18 Apr 2020 15:19:45 +0000 (18 08:19 -0700)
treeb1ed62b7607e15eb6b57533a6baca53cca5619df
parenta48f0a3c7e9f0f389b6fa35117ae51f1367973f9
[ELF][ARM] Increase default max-page-size from 4096 to 6536

See http://lists.llvm.org/pipermail/llvm-dev/2020-April/140549.html

For the record, GNU ld changed to 64k max page size in 2014
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=7572ca8989ead4c3425a1500bc241eaaeffa2c89
"[RFC] ld/ARM: Increase maximum page size to 64kB"

Android driver forced 4k page size in AArch64 (D55029) and ARM (D77746).

A binary linked with max-page-size=4096 does not run on a system with a
higher page size configured. There are some systems out there that do
this and it leads to the binary getting `Killed!` by the kernel.

In the non-linker-script cases, when linked with -z noseparate-code
(default), the max-page-size increase should not cause any size
difference. There may be some VMA usage differences, though.

Reviewed By: psmith, MaskRay

Differential Revision: https://reviews.llvm.org/D77330
63 files changed:
lld/ELF/Arch/ARM.cpp
lld/test/ELF/Inputs/far-arm-abs.s
lld/test/ELF/Inputs/far-long-arm-abs.s
lld/test/ELF/arm-abs32-dyn.s
lld/test/ELF/arm-adr.s
lld/test/ELF/arm-bl-v6.s
lld/test/ELF/arm-branch-rangethunk.s
lld/test/ELF/arm-branch-undef-weak-plt-thunk.s
lld/test/ELF/arm-branch.s
lld/test/ELF/arm-copy.s
lld/test/ELF/arm-execute-only.s
lld/test/ELF/arm-exidx-add-missing.s
lld/test/ELF/arm-exidx-canunwind.s
lld/test/ELF/arm-exidx-dedup.s
lld/test/ELF/arm-exidx-emit-relocs.s
lld/test/ELF/arm-exidx-gc.s
lld/test/ELF/arm-exidx-order.s
lld/test/ELF/arm-exidx-shared.s
lld/test/ELF/arm-fix-cortex-a8-blx.s
lld/test/ELF/arm-fix-cortex-a8-nopatch.s
lld/test/ELF/arm-fix-cortex-a8-recognize.s
lld/test/ELF/arm-fix-cortex-a8-thunk-align.s
lld/test/ELF/arm-fpic-got.s
lld/test/ELF/arm-gnu-ifunc-plt.s
lld/test/ELF/arm-gnu-ifunc.s
lld/test/ELF/arm-got-relative.s
lld/test/ELF/arm-gotoff.s
lld/test/ELF/arm-icf-exidx.s
lld/test/ELF/arm-mov-relocs.s
lld/test/ELF/arm-pie-relative.s
lld/test/ELF/arm-plt-reloc.s
lld/test/ELF/arm-sbrel32.s
lld/test/ELF/arm-target1.s
lld/test/ELF/arm-target2.s
lld/test/ELF/arm-thumb-adr.s
lld/test/ELF/arm-thumb-interwork-abs.s
lld/test/ELF/arm-thumb-interwork-notfunc.s
lld/test/ELF/arm-thumb-interwork-shared.s
lld/test/ELF/arm-thumb-interwork-thunk-v5.s
lld/test/ELF/arm-thumb-ldrlit.s
lld/test/ELF/arm-thumb-no-undefined-thunk.s
lld/test/ELF/arm-thumb-plt-range-thunk-os.s
lld/test/ELF/arm-thumb-plt-reloc.s
lld/test/ELF/arm-thumb-thunk-empty-pass.s
lld/test/ELF/arm-thumb-thunk-symbols.s
lld/test/ELF/arm-thumb-undefined-weak.s
lld/test/ELF/arm-thunk-largesection.s
lld/test/ELF/arm-thunk-multipass-plt.s
lld/test/ELF/arm-thunk-nosuitable.s
lld/test/ELF/arm-thunk-re-add.s
lld/test/ELF/arm-tls-gd-nonpreemptible.s
lld/test/ELF/arm-tls-gd32.s
lld/test/ELF/arm-tls-ie32.s
lld/test/ELF/arm-tls-ldm32.s
lld/test/ELF/arm-tls-le32.s
lld/test/ELF/arm-tls-norelax-gd-ie.s
lld/test/ELF/arm-tls-norelax-gd-le.s
lld/test/ELF/arm-tls-norelax-ie-le.s
lld/test/ELF/arm-tls-norelax-ld-le.s
lld/test/ELF/arm-undefined-weak.s
lld/test/ELF/global-offset-table-position-arm.s
lld/test/ELF/pack-dyn-relocs-arm2.s
lld/test/ELF/pack-dyn-relocs.s