Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nm(XNX) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 nm(XNX)                        6 January 1993                        nm(XNX)


 Name

    nm - prints name list

 Syntax

    nm [ -acgnoOprsSuv ] [ ++offset ] [ file ... ]

 Description

    nm prints the name list (symbol table) of each object file in the argu-
    ment list.  If an argument is an archive, a listing for each object file
    in the archive will be produced.  nm works transparently on COFF files
    and XENIX generated object files. nm translates all possible COFF symbols
    into standard XENIX object symbols.

    If no file is given, the symbols in a.out are listed.

    Each symbol name is preceded by its value in hexadecimal (blanks if unde-
    fined) and one of the letters ``U'' (undefined), ``A'' (absolute), ``T''
    (text segment symbol), ``D'' (data segment symbol), ``B'' (bss segment
    symbol), ``S'' (segment name), ``C'' (common symbol), ``K'' (8086 common
    segment), or ``F'' (source file name).  If the symbol table is in seg-
    mented format, symbol values are displayed as segment:offset.  If the
    symbol is local (non-external), the type letter is in lowercase.  The
    output is sorted alphabetically.

    Options are:

    -a   Attempt to print the namelist of all modules in an archive library.
         Normally, nm silently ignores any library members which are not
         valid object modules.  Using this option causes nm to report an
         error for all such modules. Note that the first member in any
         library which has been processed by ranlib(XNX) is called .SYMDEF
         and is not a valid object module, thus the -a option will always
         produce at least one error message when used on such a library.

    -c   Print only C program symbols (symbols which begin with `_') as they
         appeared in the C program.

    -g   Print only global (external) symbols.

    -n   Sort numerically rather than alphabetically.

    -o   Prepend file or archive element name to each output line rather than
         only once.

    -O   Print symbol values in octal.

    -p   Don't sort; print in symbol-table order.

    -r   Sort in reverse order.

    -s   Sort by size of symbol and display each symbol's size instead of
         value.  The last symbol in each text or data segment may be assigned
         a size of 0. This implies the -n option.

    -S   Switch the display format. If the symbol table is in segmented for-
         mat, print values in non-segmented format. If not segmented, print
         values in segmented format.  Segment offsets in 386 object modules
         and executable files are 32 bits rather than 16 bits.

    -u   Print only undefined symbols.

    -v   Also describe the object file and symbol table format.

 Files

    a.out

 See Also

    ar(XNX), ar(F), a.out(F)

 Standards Conformance

    nm is conformant with:
    AT&T SVID Issue 2;
    and X/Open Portability Guide, Issue 3, 1989.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026