1 .\" Copyright (c) 2007 Hyogeol Lee <hyogeollee@gmail.com>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer
9 .\" in this position and unchanged.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\" $Id: nm.1 2377 2012-01-03 07:10:59Z jkoshy $
32 .Nd display symbolic information in object files
37 .Op Fl -demangle Ns Op = Ns style
45 .Op Fl -print-file-name
47 .Op Fl -radix= Ns Ar format
50 .Op Fl -undefined-only
76 utility displays symbolic information in the object files,
77 executables, and object library files named by its arguments.
78 Lack of symbolic information in an otherwise valid input
79 file, is not considered to be an error.
80 If no files are specified on the command line,
87 utility recognizes the following options:
88 .Bl -tag -width ".Fl d Ar argument"
90 Display all symbols, including debugger-only symbols.
92 Display only defined symbols.
93 .It Fl -demangle Ns Op = Ns Ar style
94 Decode (demangle) low-level symbol names into human-readable names.
95 Supported values for argument
105 is not specified, it is taken to be
108 Only display dynamic symbols.
109 This option is only meaningful for shared libraries.
111 Display a help message and exit.
112 .It Fl -format Ns = Ns Ar format
113 Display output in the format specified by argument
115 Supported values for the format argument are
120 The default output format is
123 Display the filename and line number associated a symbol using
124 any debugging information present in the input file.
125 For defined symbols, look up the line number associated with
126 the address of the symbol.
127 For undefined symbols, look up the line number associated with
128 a relocation entry that refers to the symbol.
129 If line number information can be determined, it is displayed after
130 other symbol information.
132 Do not demangle symbol names (default).
136 Sort symbols numerically by address instead of alphabetically by name.
140 archives, include the index of the archive's members.
141 .It Fl -print-file-name
142 Write the full pathname or library name of an object on each line,
143 before the rest of the information for a symbol.
144 If this option is not specified,
146 will only identify an input file once, before its symbols are
149 Print the size of each symbol instead of its value.
150 .It Fl -radix Ns = Ns Ar radix
151 Print numeric values using the specified radix.
152 Supported values for argument
162 Reverse the order of the sort.
164 Sort symbols by size instead of alphabetically by name.
165 .It Fl -undefined-only
166 Display only undefined symbols.
168 Display the version identifier for
172 Equivalent to specifying option
173 .Fl -print-file-name .
175 Equivalent to specifying option
176 .Fl -format= Ns Ar bsd .
178 Equivalent to specifying option
179 .Fl -demangle Ns Op = Ns Ar style .
181 Equivalent to specifying option
184 Equivalent to specifying option
185 .Fl -format Ns = Ns Ar format .
187 Equivalent to specifying option
188 .Fl -format Ns = Ns Ar posix .
190 Equivalent to specifying option
193 Equivalent to specifying option
196 Equivalent to specifying option
199 Only display information for global and static symbols.
201 Produce full output (default).
203 Only display information about global (external) symbols.
205 Equivalent to specifying option
208 Equivalent to specifying option
211 Equivalent to specifying option
214 If POSIX output was specified using the
218 options, this option is equivalent to specifying
219 .Fl -radix Ns = Ns Sq Ar o .
220 If POSIX output was not specified, this option
221 acts as a synonym for the
225 Equivalent to specifying option
231 Equivalent to specifying option
234 Equivalent to specifying option
237 Equivalent to specifying option
238 .Fl -radix= Ns Ar radix .
240 Equivalent to specifying option
241 .Fl -undefined-only .
243 Write numeric values in hexadecimal (equivalent to -t x).
249 utility can present its information in a number of formats, numeric
250 radices and sort orders.
253 uses BSD style output, a hexadecimal radix, without output sorted
254 alphabetically by name and without demangling of names.
256 For each symbol listed,
258 presents the following information:
261 The library or object name, if options
269 The type of the symbol denoted by a single character as below:
270 .Bl -tag -compact -width indent
272 A global, absolute symbol.
276 (uninitialized data) symbol.
280 symbol, representing uninitialized data.
282 A global symbol naming initialized data.
286 A read-only data symbol.
288 A global text symbol.
296 A local absolute symbol.
300 (uninitialized data) symbol.
306 A weak object that is undefined.
308 A weak symbol that is undefined.
313 The value of the symbol.
315 The size of the symbol if applicable.
317 Line number information, if available and if options
333 utility and this manual page were written by
334 .An Hyogeol Lee Aq hyogeollee@gmail.com .