[PATCH] D55029: set default max-page-size to 4KB in lld for Android Aarch64

Peter Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 30 03:07:58 PST 2018


peter.smith added a comment.

In D55029#1313120 <https://reviews.llvm.org/D55029#1313120>, @ruiu wrote:

> LGTM. Please commit.
>
> Peter, I wonder if you are fine with the default 64KiB page size with lld, especially given that lld always round up the text segment size to the maximum page size on disk and fill the padding with trap instructions. On average, that should increase the executable size by 32 KiB compared to other linkers. I don't think that size is necessarily bad, because we are doing that for a security purpose, but I wonder if people are OK with that.


I think the default is fine at 64KiB . Going back to 4KiB risks breaking programs that currently use default options on platforms that have chosen 64KiB which I think is a step too far. So far the concern about ELF file size has come from Android, where we have a separate target in clang where it is fairly easy to pass a 4KiB page size by default. There is a chance that this may change in the future as more general AArch64 linux platforms start being deployed on devices with limited storage. I guess at that point we could consider implementing common-page-size if it were a problem to pass 4KiB page size.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55029/new/

https://reviews.llvm.org/D55029





More information about the cfe-commits mailing list