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

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 19 15:56:19 PDT 2018


pcc added a comment.

In https://reviews.llvm.org/D45841#1072731, @tmsriram wrote:

> 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.


Yes, I meant the ordering imposed by this patch which would be hot followed by unlikely, startup, etc.

>> 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?

That would also work for now.


https://reviews.llvm.org/D45841





More information about the llvm-commits mailing list