[PATCH] D137620: [BOLT] Don't align .text to pageAlign
Denis Revunov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 11:29:29 PST 2022
treapster added a comment.
> To me, it appears there are two outstanding issues that we need to solve. One is that we use large pages by default. Without hugify/hottext it doesn't make sense unless dynamic loader supports large pages.
My understanding is that newer kernels/loaders support large pages and can properly map them without the use of -hugify, so it makes sense to use large pages by default. I wouldn't call it an issue, if you don't like it you can always use -no-huge-pages.
In D137620#3934504 <https://reviews.llvm.org/D137620#3934504>, @maksfb wrote:
> Just using 64-byte alignment and relying on the containing segment being aligned to the page size will not always work. One example of the latter is "-use-old-text".
Why it will not work with -use-old-text? The whole point of this option is to put new text in place of old, and by trying to align it to 2 MB you make it unachievable unless the binary was prelinked with huge padding. If you still want 2MB aligned text, you can pass align-text=0x200000. I think this patch just makes defaults more reasonable, otherwise you can always align however you want. And i also don't understand why MaxAlignBytes might be better
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137620/new/
https://reviews.llvm.org/D137620
More information about the llvm-commits
mailing list