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

1.27    ! guenther    1: .\"    $OpenBSD: nm.1,v 1.26 2015/04/09 04:46:18 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.27    ! guenther   33: .Dd $Mdocdate: April 9 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.27    ! guenther   41: .Op Fl aCDegnoprsuw
1.20      sobrado    42: .Op Ar
1.1       deraadt    43: .Sh DESCRIPTION
                     44: The symbol table (name list) of each object in
                     45: .Ar file(s)
                     46: is displayed.
                     47: If a library (archive) is given,
1.4       aaron      48: .Nm
1.1       deraadt    49: displays a list for each
                     50: object archive member.
                     51: If
                     52: .Ar file
                     53: is not present,
                     54: .Nm
                     55: searches for the file
                     56: .Pa a.out
1.5       aaron      57: and displays its symbol table if it exists.
                     58: .Pp
                     59: The options are as follows:
1.6       aaron      60: .Bl -tag -width Ds
1.1       deraadt    61: .It Fl a
                     62: Display symbol table entries inserted for use by debuggers.
1.7       espie      63: .It Fl C
1.14      jmc        64: Decode low-level symbol names.
                     65: This involves removing extra underscores and making C++ function names readable.
1.27    ! guenther   66: .It Fl D
        !            67: Display the dynamic symbol table instead of the normal symbol table.
1.11      espie      68: .It Fl e
                     69: Output extended information, that is `w' for weak symbols, `f' for
                     70: function-like symbols, and `o' for object-like symbols.
1.1       deraadt    71: .It Fl g
                     72: Restrict display to external (global) symbols.
                     73: .It Fl n
                     74: Present results in numerical order.
                     75: .It Fl o
                     76: Display full path or library name of object on every line.
                     77: .It Fl p
                     78: Do not sort at all.
                     79: .It Fl r
                     80: Reverse order sort.
1.13      mickey     81: .It Fl s
                     82: Show archive index.
1.1       deraadt    83: .It Fl u
                     84: Display undefined symbols only.
                     85: .It Fl w
                     86: Warn about non-object archive members.
1.3       aaron      87: Normally,
                     88: .Nm nm
                     89: will silently ignore all archive members which are not
1.1       deraadt    90: object files.
                     91: .El
                     92: .Pp
                     93: Each symbol name is preceded by its value (a blank field if the symbol
                     94: is undefined) and one of the following letters:
                     95: .Pp
                     96: .Bl -tag -width Ds -compact -offset indent
                     97: .It Fl
                     98: debugger symbol table entries (see the
                     99: .Fl a
1.14      jmc       100: option)
1.1       deraadt   101: .It Li A
                    102: absolute
                    103: .It Li B
1.23      uwe       104: bss or tbss segment symbol
1.1       deraadt   105: .It Li C
                    106: common symbol
                    107: .It Li D
1.23      uwe       108: data or tdata segment symbol
1.15      jmc       109: .It Li F
1.1       deraadt   110: file name
1.18      mickey    111: .It Li R
                    112: read-only data segment symbol
1.1       deraadt   113: .It Li T
                    114: text segment symbol
                    115: .It Li U
                    116: undefined
1.16      mjc       117: .It Li W
1.26      guenther  118: weak symbol
1.1       deraadt   119: .El
                    120: .Pp
1.14      jmc       121: If the symbol is local (non-external), the type letter is in lower case.
1.1       deraadt   122: The output is sorted alphabetically.
                    123: .Sh SEE ALSO
                    124: .Xr ar 1 ,
1.17      mickey    125: .Xr size 1 ,
1.1       deraadt   126: .Xr ar 5 ,
1.24      jmc       127: .Xr elf 5
1.21      jmc       128: .Sh STANDARDS
                    129: The
                    130: .Nm
1.25      jmc       131: utility is part of the
                    132: .St -p1003.1-2008
                    133: specification;
                    134: this implementation is largely incompatible with that standard.
1.1       deraadt   135: .Sh HISTORY
                    136: An
                    137: .Nm nm
                    138: command appeared in
                    139: .At v6 .