nm - print name list
nm [-dgnopru] [file] ...
-d Print the offsets in decimal instead of in hex
-g Print only external symbols
-n Sort numerically rather than alphabetically
-o Prepend file name to each line rather than only once
-p Do not sort, print in symbol-table order
-r Sort in reverse order
-u Print only undefined symbols
nm -n a.out # Print all symbols in numerical order
nm -dg a.out # Print globals alphabetically in decimal
Nm prints the symbol table of executable files when it is available. If
no file is given, the symbols in a.out are used. The format of the table
is somewhat compatible with the one produced by asld when used with the
-s option. The symbol table can be added with ast. Assembly language
files do not have symbol tables.
anm(1), asize(1), ar(1), size(1).