home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


nm

/usr/ccs/bin/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.

Options

-A

Write the full pathname or library name on each line. Solaris only.

-C

Print demangled C++ symbol names. Solaris only.

-D

Display the SHT_DYNSYM symbol information. Solaris only.

-e

Report only external and static symbols; obsolete.

-f

Report all information; obsolete.

-g

Write only external (global) symbol information. Solaris only.

-h

Suppress the header.

-l

Use with -p ; indicate WEAK symbols by appending an asterisk (* ) to key letters.

-n

Sort the external symbols by name.

-o

Report values in octal.

-p

Precede each symbol with its key letter (used for parsing).

-r

Report the object file's name on each line.

-R

Print the archive name (if present), followed by the object file and symbol name. -r overrides this option. Solaris only.

-s

Print section name instead of section index. Solaris only.

-t format

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

-T

Truncate the symbol name in the display; obsolete.

-u

Report only the undefined symbols.

-v

Sort the external symbols by value.

-V

Print nm 's version number on standard error.

-x

Report values in hexadecimal.

Key Letters

A

Absolute symbol.

B

BSS (uninitialized data space).

C

Common symbol. SVR4 only.

D

Data object symbol.

F

File symbol.

N

Symbol with no type.

S

Section symbol.

T

Text symbol.

U

Undefined symbol.


Previous: Reference: nl UNIX in a Nutshell: System V Edition Next: Reference: nohup
Reference: nl Book Index Reference: nohup

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System