Skip to Main Content
Unix in a Nutshell, 4th Edition
book

Unix in a Nutshell, 4th Edition

by Arnold Robbins
October 2005
Intermediate to advanced content levelIntermediate to advanced
908 pages
46h 42m
English
O'Reilly Media, Inc.
Content preview from Unix in a Nutshell, 4th Edition

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-name

Write the full pathname or library name on each line.

-g, --extern-only

Write only external (global) symbol information.

-P, --portability

Print output in the POSIX portable format.

-tradix, --radix=radix

Write numeric values in the specified radix : d for decimal, o for octal, and x for hexadecimal.

-u, --undefined-only

Report 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, --dynamic

Print dynamic, not normal, symbols. Useful only when working with dynamic objects (some kinds of shared libraries, for example).

-V, --version

Print nm’s version number on standard error.

GNU/Linux and Mac OS X Options

-a, --debug-syms

Print debugger symbols.

-n, --numeric-sort

Sort the external symbols numerically, not by name.

-p, --no-sort

Don’t sort the symbols; print them in the order they are found in the object file.

-r, --reverse-sort

Sort in reverse order.

Solaris Options

-e

Report only external and static symbols; obsolete.

-f

Report all ...

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.
Start your free trial

You might also like

Learning the Unix Operating System, 5th Edition

Learning the Unix Operating System, 5th Edition

John Strang, Grace Todino, Jerry Peek
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 0596100299Errata Page