[PATCH] D83152: llvm-nm: add flag to suppress no symbols warning
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 20:01:36 PST 2021
MaskRay added a comment.
In D83152#2551777 <https://reviews.llvm.org/D83152#2551777>, @kastiglione wrote:
> @MaskRay I haven't heard of coordination with binutils, can you say more about that? I'm particularly curious because `llvm-nm`, and other llvm tools, have many options not present in binutils.
In recent years I think we are more careful about documentation/tests and require justification for options.
> As an example @Keith added `--no-weak` previously.
The name `--no-weak` is fine. What I'd ask is the rationale for the new option: why is there a need to list non-weak symbols?
A potential risk with D48751 <https://reviews.llvm.org/D48751> is that if GNU nm uses -W for other purposes, we may have a trouble.
Another example: `llvm-nm -s` has been taken for `segment section`. In nm, it means `--print-armap`.
> How do flags get justified? I would accept this, because the complexity is so low (a bool used in one place), and non-breaking. But who am I to decide :)
I think it is case by case. For this one, `2> /dev/null` is a simple and easy workaround. I find it difficult to argue against this choice.
When there is doubt, it seems a good idea if the author is willing to persuade the other implementation. If binutils is willing to take it, it sounds like a tie-breaking.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83152/new/
https://reviews.llvm.org/D83152
More information about the llvm-commits
mailing list