[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
Tue Nov 2 09:25:42 PDT 2021
DiggerLin added a comment.
llvm-nm print out the "title first" , and then for each symbol, it print out the "symbol address" , "symbol flag" , "symbol name".
for option "--export-unique-symbol" , we do not need to print out the "title" and "symbol address" ,"symbol flag" for each symbol, instead of we need "symbol visibility" for each symbol.
if we implement the option "--export-unique-symbol" in the llvm-nm. we need to modify the following code in llvm-nm.cpp
1. modify llvm-nm: sortAndPrintSymbolList() to disable printing the "title" , "symbol address" , "symbol flag" and printing "symbol visibility" if there is option "--export-unique-symbol" .
2. and add a new visibility attribute to
struct NMSymbol {
}
3. add new compare function to compare (symbol name and symbol visibility")
if we implement the option in ""--export-unique-symbol" in llvm-objdump.cpp, we only need to add hook to invoke "exportSymbolInfoFromObjectFile()" (the function is implemented in the XCOFFDump.cpp) in llvm-objdump.cpp.
it is much clear and transparent.
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