[PATCH] D112735: export unique symbol list for xcoff with llvm-objdump new option "--export-unique-symbol"
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 1 10:34:24 PDT 2021
DiggerLin added a comment.
In D112735#3100383 <https://reviews.llvm.org/D112735#3100383>, @jhenderson wrote:
> Does this option really belong in llvm-objdump? It seems to me like it's for a different tool, probably llvm-nm (which simply prints symbol lists). In particular, I don't like the "suppresses other options" bit of the help message. llvm-objdump and llvm-readobj usually just do everything that's asked of them.
>
> The additional supporting options belong in independent patches, based on the first. If you switch to using llvm-nm, you'll find that you probably won't need the --exclude-weak option, since llvm-nm already has a --no-weak option. In fact, you may be able to get away without a new option for --export-unique-symbol, by using existing llvm-nm options, such as --dynamic, I'm not sure.
>
> Please take a look at llvm-nm, and see what you think.
Hi James,
if you run llvm-objdump --help
you will see the
llvm-objdump MachO Specific Options:
--exports-trie Display mach-o exported symbols
the option "--export-unique-symbol" do the same thing for xcoff.
--export-unique-symbol Export symbol list for xcoff object file or archive
and if you see the source of option
--macho Use MachO specific object file parser
it also suppresses other non-MachO options
in the llvm-objdump.cpp
> static void dumpInput(StringRef file) {
>
> // If we are using the Mach-O specific object file parser, then let it parse
> // the file and process the command line options. So the -arch flags can
> // be used to select specific slices, etc.
> if (MachOOpt) {
> parseInputMachO(file);
> return;
> }
>
> if (ExportUniqueSymbol) {
> exportSymbolInfoFromFile(file);
> printExportSymboList(outs());
> return;
> }
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112735/new/
https://reviews.llvm.org/D112735
More information about the llvm-commits
mailing list