[PATCH] D112735: export unique symbol list for xcoff with llvm-objdump new option "--export-unique-symbol"
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 28 10:21:16 PDT 2021
MaskRay added inline comments.
================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:163
+ // Skip Shared object file.
+ if (O->isXCOFF()) {
+ if (dyn_cast<const XCOFFObjectFile>(O)->getFlags() & XCOFF::F_SHROBJ)
----------------
You can skip all `O->isXCOFF()` checks in this function thanks to the early return.
================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:230
+
+ if (Flags & SymbolRef::SF_Protected) {
+ ExportSymbols.push_back(SymNameVisibilityTy(SymName, "protected"));
----------------
Just switch with the underlying binary format, instead of using a `SymbolRef` abstraction, then `SF_Protected` will not be needed.
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