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

1.23    ! uwe         1: .\"    $OpenBSD: nm.1,v 1.22 2009/10/27 23:51:21 deraadt 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.23    ! uwe        33: .Dd $Mdocdate: October 27 2009 $
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.22      deraadt    41: .Op Fl aCegnoprsuw
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.11      espie      66: .It Fl e
                     67: Output extended information, that is `w' for weak symbols, `f' for
                     68: function-like symbols, and `o' for object-like symbols.
1.1       deraadt    69: .It Fl g
                     70: Restrict display to external (global) symbols.
                     71: .It Fl n
                     72: Present results in numerical order.
                     73: .It Fl o
                     74: Display full path or library name of object on every line.
                     75: .It Fl p
                     76: Do not sort at all.
                     77: .It Fl r
                     78: Reverse order sort.
1.13      mickey     79: .It Fl s
                     80: Show archive index.
1.1       deraadt    81: .It Fl u
                     82: Display undefined symbols only.
                     83: .It Fl w
                     84: Warn about non-object archive members.
1.3       aaron      85: Normally,
                     86: .Nm nm
                     87: will silently ignore all archive members which are not
1.1       deraadt    88: object files.
                     89: .El
                     90: .Pp
                     91: Each symbol name is preceded by its value (a blank field if the symbol
                     92: is undefined) and one of the following letters:
                     93: .Pp
                     94: .Bl -tag -width Ds -compact -offset indent
                     95: .It Fl
                     96: debugger symbol table entries (see the
                     97: .Fl a
1.14      jmc        98: option)
1.1       deraadt    99: .It Li A
                    100: absolute
                    101: .It Li B
1.23    ! uwe       102: bss or tbss segment symbol
1.1       deraadt   103: .It Li C
                    104: common symbol
                    105: .It Li D
1.23    ! uwe       106: data or tdata segment symbol
1.10      fgsch     107: .It Li I
                    108: indirect reference (alias to other 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
                    118: weak symbol (only on ELF binaries)
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.3       aaron     126: .Xr a.out 5 ,
1.1       deraadt   127: .Xr ar 5 ,
1.13      mickey    128: .Xr elf 5 ,
1.1       deraadt   129: .Xr stab 5
1.21      jmc       130: .Sh STANDARDS
                    131: The
                    132: .Nm
                    133: utility appears as an optional part of
                    134: .St -p1003.1-2008 ;
                    135: this incarnation of
                    136: .Nm
                    137: appears largely incompatible with that standard.
1.1       deraadt   138: .Sh HISTORY
                    139: An
                    140: .Nm nm
                    141: command appeared in
                    142: .At v6 .