[PATCH] D46099: [ELF] Clarify help wording for --symbol-ordering-file

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 18:28:59 PDT 2018


smeenai added a comment.

In https://reviews.llvm.org/D46099#1078997, @pcc wrote:

> One could also read "Lay out symbols" as meaning the order of symbols in the symbol table, so I'm not sure if this is better. No strong opinions though.


That's fair. I'm not sure how to make that unambiguous without being super wordy.

In https://reviews.llvm.org/D46099#1078999, @ruiu wrote:

> It is arguable which is more accurate, "layout sections" or "layout symbols", because you can't layout symbols alone. But I agree that your new message is more intuitive and easier to understand.
>
> LGTM but please wait for a while in case other people have different opinion.


Yeah, that's also true. Slightly unrelated to this change, but `--warn-symbol-ordering` is silent right now in case you forget `-ffunction-sections` (but of course the ordering doesn't work). Would it be reasonable to extend the warnings to cover that case? I'm thinking, for each symbol specified in the symbol ordering file, warn if that symbol's section also contains other symbols, though I don't know if that would lead to false positives and/or be reasonable cost-wise.

Also, if we're willing to go with a longer help text, I think it might be helpful to note that you must compile with `-ffunction-sections -fdata-sections` in order for symbol ordering to be able to work in the help text itself.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46099





More information about the llvm-commits mailing list