[PATCH] D45841: Keep the output text sections with prefixes ".text.hot" , ".text.unlikely", ".text.startup", ".text.exit" separate

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 19 15:53:43 PDT 2018


tmsriram added a comment.

In https://reviews.llvm.org/D45841#1072712, @pcc wrote:

> Note that this ordering isn't necessarily best for every architecture. On ARM for example it is best to put the hot sections in the middle (see also https://reviews.llvm.org/D44969).


When you say "this ordering" I am confused because currently there is no ordering of the output sections with prefix ".text".   Looking at it, seems like the order in which they were seen is the order in the final binary.

> I think that for hot sections my preference would be to treat them as if they were listed in `--symbol-ordering-file`. The behaviour for the other sections seems fine to me.

So, this patch would break any symbol ordering across prefixes.  Maybe it is better to disable this feature if symbol-ordering-file is used, what do you think?


https://reviews.llvm.org/D45841





More information about the llvm-commits mailing list