[PATCH] D58263: Compute and Print Type and Section columns in "llvm-nm -f sysv" output.
Michael Trent via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 22 23:16:22 PST 2019
mtrent accepted this revision.
mtrent added a comment.
This revision is now accepted and ready to land.
Built it locally, stepped through the nm code for Mach-O files, didn't see any unintended problems. Elf changes reviewed visually only, they look mechanical. The name for "getNMSectionTagAndName" seems imperfect to me, as the Mach-O symbol type code isn't strictly about the section (A, I, -); that said, sysv is not a common format for viewing Mach-O, so I just offer it as a minor point to consider.
================
Comment at: tools/llvm-nm/llvm-nm.cpp:1100
+// section and name, to be used in format=sysv output.
+static char getNMSectionTagAndName(SymbolicFile &Obj, basic_symbol_iterator I,
+ StringRef &SecName) {
----------------
Nit: Should this be getNMClassTagAndSectionName?
================
Comment at: tools/llvm-nm/llvm-nm.cpp:1243
+ getNMTypeName(Obj, Sym, S.TypeName);
+ S.TypeChar = getNMSectionTagAndName(Obj, Sym, S.SectionName);
std::error_code EC = Sym.printName(OS);
----------------
Nit: See above
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58263/new/
https://reviews.llvm.org/D58263
More information about the llvm-commits
mailing list