[PATCH] D25079: [ELF] Set maximum page size to 65536 on AArch64

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 12:10:27 PDT 2016


peter.smith added a comment.

I've had a chance to talk with a few colleagues:

- There is no consensus amongst linux distributions about what the page size should be for AARCH64, Ubuntu have chosen 4k, fedora 64k
- A 64k page size kernel can't run ARM binaries that assume a 4k page size
- There are some applications that don't work on a 64k page size kernel if program segments are only aligned at 4k
- LLD doesn't have a concept of common-page-size and max-page-size so if 64k page size is chosen all output sections are aligned to 64k boundary as well as program segments.
- Aligning everything to a 64k page size should work on a 4k page size kernel but depending on how many output sections a program has this could be quite wasteful for a 4k page size kernel.

To summarise this looks like:

- keeping the default at 4k will mean that people with 64k page size kernels will need to set the max page size to 64k
- changing the default to 64k will mean that people with 4k page size kernels may see non trivial increases in image size

It seems like whatever default is chosen the other side won't be happy. I don't think that we can look to gold/ld.bfd here as they won't see the same size increases by setting the abi page size.

My instinct is to go for correctness over performance, but this does mean changing long established behaviour. Do you have a specific reason to want to change the default beyond matching some parts of what gold/bfd implement?


Repository:
  rL LLVM

https://reviews.llvm.org/D25079





More information about the llvm-commits mailing list