[PATCH] D61688: [LLD][ELF] Full support for -n (--nmagic) and -N (--omagic) via -zcommon-page-size

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 06:05:32 PDT 2019


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM

> - max-page-size or abi-page-size is the largest page size that might be encountered at run-time. For example some AArch64 platforms such as Fedora use 64k page size, others such as Ubuntu use 4k page size. If an executable is to be portable it sets max-page-size to 64k. All significant layout decisions have to use the max-page-size.
> - common-page-size or sometimes just page-size is the "most common" page-size that might be encountered at run-time. There are some optimisations that can be done that use this. The best explanation that I've seen is the description DATA_SEGMENT_ALIGN at https://sourceware.org/binutils/docs-2.30/ld/Builtin-Functions.html#Builtin-Functions. As I understand it, LLD only uses common-page-size for D33630 <https://reviews.llvm.org/D33630> "Fill the empty space in executable segments with instruction padding" and in the linker script CONSTANT(COMMONPAGESIZE).

This is an excellent summary of the differences of the two. Could you add this to this patch as a comment?


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

https://reviews.llvm.org/D61688





More information about the llvm-commits mailing list