[BACK]Return to nm.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / nm

Annotation of src/usr.bin/nm/nm.1, Revision 1.28

1.28    ! miod        1: .\"    $OpenBSD: nm.1,v 1.27 2015/05/17 20:19:08 guenther Exp $
1.1       deraadt     2: .\"    $NetBSD: nm.1,v 1.3 1995/08/31 23:41:58 jtc Exp $
                      3: .\"
                      4: .\" Copyright (c) 1980, 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
1.12      millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"     @(#)nm.1       8.1 (Berkeley) 6/6/93
                     32: .\"
1.28    ! miod       33: .Dd $Mdocdate: May 17 2015 $
1.1       deraadt    34: .Dt NM 1
1.4       aaron      35: .Os
1.1       deraadt    36: .Sh NAME
                     37: .Nm nm
                     38: .Nd display name list (symbol table)
                     39: .Sh SYNOPSIS
                     40: .Nm nm
1.28    ! miod       41: .Op Fl AaCDegnoPprsuw
        !            42: .Op Fl t d|o|x
1.20      sobrado    43: .Op Ar
1.1       deraadt    44: .Sh DESCRIPTION
                     45: The symbol table (name list) of each object in
                     46: .Ar file(s)
                     47: is displayed.
                     48: If a library (archive) is given,
1.4       aaron      49: .Nm
1.1       deraadt    50: displays a list for each
                     51: object archive member.
                     52: If
                     53: .Ar file
                     54: is not present,
                     55: .Nm
                     56: searches for the file
                     57: .Pa a.out
1.5       aaron      58: and displays its symbol table if it exists.
                     59: .Pp
                     60: The options are as follows:
1.6       aaron      61: .Bl -tag -width Ds
1.28    ! miod       62: .It Fl A
        !            63: Display the full path or library name of object on every line.
1.1       deraadt    64: .It Fl a
                     65: Display symbol table entries inserted for use by debuggers.
1.7       espie      66: .It Fl C
1.14      jmc        67: Decode low-level symbol names.
                     68: This involves removing extra underscores and making C++ function names readable.
1.27      guenther   69: .It Fl D
                     70: Display the dynamic symbol table instead of the normal symbol table.
1.11      espie      71: .It Fl e
                     72: Output extended information, that is `w' for weak symbols, `f' for
                     73: function-like symbols, and `o' for object-like symbols.
1.1       deraadt    74: .It Fl g
                     75: Restrict display to external (global) symbols.
                     76: .It Fl n
                     77: Present results in numerical order.
                     78: .It Fl o
1.28    ! miod       79: Display the full path or library name of object on every line
        !            80: .Pq this is similar to Fl A .
        !            81: .It Fl P
        !            82: Report information in POSIX format: full path or library name of object if
        !            83: either
        !            84: .Fl A
        !            85: or
        !            86: .Fl o
        !            87: has been specified; symbol name; symbol type;
        !            88: symbol value and size (unless the symbol is undefined).
        !            89: The radix of symbol values and sizes defaults to decimal, and may be changed
        !            90: with the
        !            91: .Fl t
        !            92: option.
1.1       deraadt    93: .It Fl p
                     94: Do not sort at all.
                     95: .It Fl r
                     96: Reverse order sort.
1.13      mickey     97: .It Fl s
                     98: Show archive index.
1.28    ! miod       99: .It Fl t Ar d|o|x
        !           100: In POSIX format output, choose the numeric radix as follows:
        !           101: .Bl -tag -width 3n -compact
        !           102: .It d
        !           103: Decimal.
        !           104: .It o
        !           105: Octal.
        !           106: .It x
        !           107: Hexadecimal.
        !           108: .El
1.1       deraadt   109: .It Fl u
                    110: Display undefined symbols only.
                    111: .It Fl w
                    112: Warn about non-object archive members.
1.3       aaron     113: Normally,
                    114: .Nm nm
                    115: will silently ignore all archive members which are not
1.1       deraadt   116: object files.
                    117: .El
                    118: .Pp
                    119: Each symbol name is preceded by its value (a blank field if the symbol
                    120: is undefined) and one of the following letters:
                    121: .Pp
                    122: .Bl -tag -width Ds -compact -offset indent
                    123: .It Fl
                    124: debugger symbol table entries (see the
                    125: .Fl a
1.14      jmc       126: option)
1.1       deraadt   127: .It Li A
                    128: absolute
                    129: .It Li B
1.23      uwe       130: bss or tbss segment symbol
1.1       deraadt   131: .It Li C
                    132: common symbol
                    133: .It Li D
1.23      uwe       134: data or tdata segment symbol
1.15      jmc       135: .It Li F
1.1       deraadt   136: file name
1.18      mickey    137: .It Li R
                    138: read-only data segment symbol
1.1       deraadt   139: .It Li T
                    140: text segment symbol
                    141: .It Li U
                    142: undefined
1.16      mjc       143: .It Li W
1.26      guenther  144: weak symbol
1.1       deraadt   145: .El
                    146: .Pp
1.14      jmc       147: If the symbol is local (non-external), the type letter is in lower case.
1.1       deraadt   148: The output is sorted alphabetically.
                    149: .Sh SEE ALSO
                    150: .Xr ar 1 ,
1.17      mickey    151: .Xr size 1 ,
1.1       deraadt   152: .Xr ar 5 ,
1.24      jmc       153: .Xr elf 5
1.21      jmc       154: .Sh STANDARDS
                    155: The
                    156: .Nm
1.25      jmc       157: utility is part of the
                    158: .St -p1003.1-2008
                    159: specification;
                    160: this implementation is largely incompatible with that standard.
1.1       deraadt   161: .Sh HISTORY
                    162: An
                    163: .Nm nm
                    164: command appeared in
                    165: .At v6 .