[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 10:22:27 PST 2022


DiggerLin marked 8 inline comments as done.
DiggerLin added inline comments.


================
Comment at: llvm/docs/CommandGuide/llvm-nm.rst:132
+ Specify the type of XCOFF object file, ELF object file, IR object file input
+ from command line or from big archive files that llvm-nm should examine. The
+ mode must be one of the following:
----------------
jhenderson wrote:
> Use the proper-noun form to make it stand out that this is a specific file format and doesn't simply mean "large regular archives".
we can create gnu archive file which contain xcoff object file, bit code, elf object file, etc with llvm-ar technically.(it is perfectly valid, just not particularly useful) . 
all the llvm tools can support decode the xcoff object file in gnu archive(if there is) or elf object file in big archive(if there is) now.
so we do not need to a specific archive format here. 


================
Comment at: llvm/tools/llvm-nm/Opts.td:16
 
+defm bit_mode : Eq<"bit-mode", "Specifies the type of object file llvm-nm should examine. The bit-mode must be one of : 32, 64 ,any(default)">;
 def debug_syms : FF<"debug-syms", "Show all symbols, even debugger only">;
----------------
jhenderson wrote:
> MaskRay wrote:
> > Ensure the space separators are consistently used: `32, 64, (default) any` or `32, 64, any (default)`
> > 
> > The leading message can be "(AIX specific) Specify the type of object file to examine". Note that other messages are imperative sentences and don't use the third-person singular. The tool is called `llvm-nm`, so it is unneeded to repeat `llvm-nm` in individual option messages.
> Marked as done, but not addressed?
-X is not only AIX specific now. it work for llvm bit code, elf object file,xcoff object file from gnu archive and big archive or from command line input .


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