[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.31

1.31    ! schwarze    1: .\"    $OpenBSD: nm.1,v 1.30 2015/09/15 15:44:07 schwarze 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.31    ! schwarze   33: .Dd $Mdocdate: September 15 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
1.30      schwarze   42: .Op Fl t Cm d Ns | Ns Cm o Ns | Ns Cm 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.30      schwarze   99: .It Fl t Cm d Ns | Ns Cm o Ns | Ns Cm x
1.28      miod      100: In POSIX format output, choose the numeric radix as follows:
1.29      jmc       101: .Pp
                    102: .Bl -tag -width 3n -compact -offset indent
1.30      schwarze  103: .It Cm d
1.28      miod      104: Decimal.
1.30      schwarze  105: .It Cm o
1.28      miod      106: Octal.
1.30      schwarze  107: .It Cm x
1.28      miod      108: Hexadecimal.
                    109: .El
1.1       deraadt   110: .It Fl u
                    111: Display undefined symbols only.
                    112: .It Fl w
                    113: Warn about non-object archive members.
1.3       aaron     114: Normally,
                    115: .Nm nm
                    116: will silently ignore all archive members which are not
1.1       deraadt   117: object files.
                    118: .El
                    119: .Pp
                    120: Each symbol name is preceded by its value (a blank field if the symbol
                    121: is undefined) and one of the following letters:
                    122: .Pp
                    123: .Bl -tag -width Ds -compact -offset indent
                    124: .It Fl
                    125: debugger symbol table entries (see the
                    126: .Fl a
1.14      jmc       127: option)
1.1       deraadt   128: .It Li A
                    129: absolute
                    130: .It Li B
1.23      uwe       131: bss or tbss segment symbol
1.1       deraadt   132: .It Li C
                    133: common symbol
                    134: .It Li D
1.23      uwe       135: data or tdata segment symbol
1.15      jmc       136: .It Li F
1.1       deraadt   137: file name
1.18      mickey    138: .It Li R
                    139: read-only data segment symbol
1.1       deraadt   140: .It Li T
                    141: text segment symbol
                    142: .It Li U
                    143: undefined
1.16      mjc       144: .It Li W
1.26      guenther  145: weak symbol
1.1       deraadt   146: .El
                    147: .Pp
1.14      jmc       148: If the symbol is local (non-external), the type letter is in lower case.
1.1       deraadt   149: The output is sorted alphabetically.
                    150: .Sh SEE ALSO
                    151: .Xr ar 1 ,
1.17      mickey    152: .Xr size 1 ,
1.1       deraadt   153: .Xr ar 5 ,
1.24      jmc       154: .Xr elf 5
1.21      jmc       155: .Sh STANDARDS
                    156: The
                    157: .Nm
1.25      jmc       158: utility is part of the
                    159: .St -p1003.1-2008
                    160: specification;
                    161: this implementation is largely incompatible with that standard.
1.1       deraadt   162: .Sh HISTORY
                    163: An
                    164: .Nm nm
                    165: command appeared in
1.31    ! schwarze  166: .At v1 .