Name
nm
Synopsis
nm [options]objfiles
Print the symbol table (name list) in alphabetical order for one or more object files (usually ELF or COFF files), shared or static libraries, or binary executable programs. Output includes each symbol’s value, type, size, name, etc. A key letter categorizing the symbol can also be displayed. You must supply at least one object file.
On Solaris, nm is in /usr/ccs/bin and /usr/xpg4/bin.
Common Options
-A,--print-file-nameWrite the full pathname or library name on each line.
-g,--extern-onlyWrite only external (global) symbol information.
-P,--portabilityPrint output in the POSIX portable format.
-tradix,--radix=radixWrite numeric values in the specified radix :
dfor decimal,ofor octal, andxfor hexadecimal.-u,--undefined-onlyReport only the undefined symbols.
Solaris and GNU/Linux Options
-C,--demangle[=style]Print demangled C++ symbol names. GNU/Linux lets you supply the appropriate demangling style.
-D,--dynamicPrint dynamic, not normal, symbols. Useful only when working with dynamic objects (some kinds of shared libraries, for example).
-V,--versionPrint nm’s version number on standard error.
GNU/Linux and Mac OS X Options
-a,--debug-symsPrint debugger symbols.
-n,--numeric-sortSort the external symbols numerically, not by name.
-p,--no-sortDon’t sort the symbols; print them in the order they are found in the object file.
-r,--reverse-sortSort in reverse order.
Solaris Options
-
-e Report only external and static symbols; obsolete.
-
-f Report all ...