[PATCH] D118193: [llvm-nm] add a new option -X to specify the type of object file llvm-nm should examine

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 06:20:51 PST 2022


DiggerLin marked an inline comment as done.
DiggerLin added a comment.

In D118193#3289498 <https://reviews.llvm.org/D118193#3289498>, @jhenderson wrote:

>> Added a new option "-X" to specify,which type of object file should be examined.
>> For example,
>>
>> 1. "llvm-nm -X64 archive.a" only deals with the 64-bit object files in archive.a, ignoring all 32-bit object files.
>
> I'm not sure what this second sentence is actually saying. Please fix it.
>
>> 2. "llvm-nm -X32 xcoffobj32.o xcoffobj64.o " only deal with the 32bit , 64bit object files input from command line

  it should be 
    "llvm-nm -X32  xcoffobj32.o xcoffobj64.o " only deal with the 32bit object file "xcoffobj32.o" ,  64bit object file "xcoffobj64.o" will be ignored. 



================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:1813
+static bool shouldDump(SymbolicFile &Obj) {
+  // -X option only work for XCOFF object file, ELF object file, IR object file
+  // input from command line or archive files.
----------------
jhenderson wrote:
> Obvious question: why does it only work for those kinds of files, and not COFF or Mach-O files (for example)?
based the our requirement , we need the the option for  XCOFF, llvmbit code and ELF object file, I am not sure about the whether it is COFF and Mach-O need the functionality or not, if the COFF and Mach-O need the functionality, we can a new separate patch later. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118193/new/

https://reviews.llvm.org/D118193



More information about the llvm-commits mailing list