MC68NM(1)

NAME
mc68nm - print name list of a MC68000 object file

SYNOPSIS
mc68nm [ options ] file-names

DESCRIPTION
The mc68nm command displays the symbol table of each Motorola 68000 object file file-name. File-name may be a relocatable or absolute Motorola 68000 object file; or it may be an archive of relocatable or absolute Motorola 68000 object files. For each symbol, the following information is printed. For the TYPE, SIZE, or LINE information, the object file must be compiled with the -g option of the dmdcc(1) command.

Name
    The name of the symbol.

Value
    Its value expressed as an offset or an address depending on its storage class.

Class
    Its storage class.

Type
    Its type and derived type. If the symbol is an instance of a structure or of a union, then the structure or union tag is given following the type (e.g. struct-tag). If the symbol is an array, then the array dimensions are given following the type (eg., char[n][m]).

Size
    Its size in bytes, if available.

Line
    The source line number at which it is defined, if available.

Section
    For storage classes static and external, the object file section containing the symbol (e.g., text, data or bss).

The output of mc68nm may be controlled using the following options:

-d  Prints the value and size of a symbol in decimal (the default).

-o  Prints the value and size of a symbol in octal instead of decimal.

-x  Prints the value and size of a symbol in hexadecimal instead of decimal.

-h  Does not display the output header data.

-v  Sorts external symbols by value before they are printed.

-n  Sorts external symbols by name before they are printed.

-e  Prints only external and static symbols.

-f  that are normally suppressed.

-u  Prints undefined symbols only.

-V  Prints the version of the mc68nm command executing on the standard error output.

-T  By default, mc68nm prints the entire name of the symbols listed. Since object files can have symbol names with an arbitrary number of characters, a name that is longer than the width of the column set aside for names will overflow its column, forcing every column after the name to be misaligned. The -T option causes mc68nm to truncate every name which would otherwise overflow its column and place an asterisk as the last character in the displayed name to mark it as truncated.

Options may be used in any order, either singly or in combination, and may appear anywhere in the command line. Therefore, both mc68nm name -e -v and mc68nm -ve name print the static and external symbols in name, with external symbols sorted by value.

FILES
/usr/tmp/nm??????

SEE ALSO
dmdcc(1), mc68as(1), mc68ld(1).
a.out(4), ar(4) in the UNIX System V Programmer's Reference Manual.

DIAGNOSTICS

``mc68nm:  name:  cannot open''
    if name cannot be read.

``mc68nm:  name:  bad magic''
    if name is not an appropriate Motorola 68000 object file.

``mc68nm:  name:  no symbols''
    if the symbols have been stripped from name.

WARNINGS
When all the symbols are printed, they must be printed in the order they appear in the symbol table in order to preserve scoping information. Therefore, the -v and -n options should be used only in conjunction with the -e option.