Linux in a Nutshell, Third Edition
by Ellen Siever, Stephen Spainhour, Jessica P. Hekman, Stephen Figgins
Name
nm
Synopsis
nm [options] [objfiles]
Description
Print the symbol table (name list) in alphabetical order for one or more object files. If no object files are specified, perform operations on a.out. Output includes each symbol’s value, type, size, name, and so on. A key letter categorizing the symbol can also be displayed. If no object file is given, use a.out.
Options
- -a, --debug-syms
Print debugger symbols.
- -f format
Specify output format (bsd, sysv, or posix). Default is bsd.
- -g, --extern-only
Print external symbols only.
- -n, -v, --numeric-sort
Sort the external symbols by address.
- -p, --no-sort
Don’t sort the symbols at all.
- -r, --reverse-sort
Sort in reverse, alphabetically or numerically.
- --size-sort
Sort by size.
- -u, --undefined-only
Report only the undefined symbols.
- -A, -o, -print-file-name
Print input filenames before each symbol.
- -C, --demangle
Translate low-level symbol names into readable versions.
- -D, --dynamic
Print dynamic, not normal, symbols. Useful only when working with dynamic objects (some kinds of shared libraries, for example).
- -P, --portability
Same as -f posix.
- -V, --version
Print nm’s version number on standard error.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access