version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
NM |
|
|
2 |
!!!NM |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
SEE ALSO |
|
|
8 |
COPYRIGHT |
|
|
9 |
---- |
|
|
10 |
!!NAME |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
nm - list symbols from object files |
|
|
14 |
!!SYNOPSIS |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
nm [[__-a--debug-syms__] [[__-g--extern-only__] |
|
|
18 |
[[__-B__] [[__-C--demangle__[[=''style'']] |
|
|
19 |
[[__-D--dynamic__] [[__-s--print-armap__] |
|
|
20 |
[[__-A-o--print-file-name__] [[__-n-v--numeric-sort__] |
|
|
21 |
[[__-p--no-sort__] [[__-r--reverse-sort__] |
|
|
22 |
[[__--size-sort__] [[__-u--undefined-only__] [[__-t__ |
|
|
23 |
''radix''__--radix=__''radix''] |
|
|
24 |
[[__-P--portability__] [[__--target=__''bfdname''] |
|
|
25 |
[[__-f__''format''__--format=__''format''] |
|
|
26 |
[[__--defined-only__] [[__-l--line-numbers__] |
|
|
27 |
[[__--no-demangle__] [[__-V--version__] [[__-X |
|
|
28 |
32_64__] [[__--help__] [[''objfile''...] |
|
|
29 |
!!DESCRIPTION |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
GNU __nm__ lists the symbols from object |
|
|
33 |
files ''objfile''.... If no object files are listed as |
|
|
34 |
arguments, __nm__ assumes the file |
|
|
35 |
''a.out''. |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
For each symbol, __nm__ shows: |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
The symbol value, in the radix selected by options (see |
|
|
42 |
below), or hexadecimal by default. |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
The symbol type. At least the following types are used; |
|
|
46 |
others are, as well, depending on the object file format. If |
|
|
47 |
lowercase, the symbol is local; if uppercase, the symbol is |
|
|
48 |
global (external). |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
A |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
The symbol's value is absolute, and will not be changed by |
|
|
55 |
further linking. |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
B |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
The symbol is in the uninitialized data section (known as |
|
|
62 |
BSS ). |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
C |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
The symbol is common. Common symbols are uninitialized data. |
|
|
69 |
When linking, multiple common symbols may appear with the |
|
|
70 |
same name. If the symbol is defined anywhere, the common |
|
|
71 |
symbols are treated as undefined references. |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
D |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
The symbol is in the initialized data section. |
|
|
78 |
|
|
|
79 |
|
|
|
80 |
G |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
The symbol is in an initialized data section for small |
|
|
84 |
objects. Some object file formats permit more efficient |
|
|
85 |
access to small data objects, such as a global int variable |
|
|
86 |
as opposed to a large global array. |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
I |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
The symbol is an indirect reference to another symbol. This |
|
|
93 |
is a GNU extension to the a.out object file |
|
|
94 |
format which is rarely used. |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
N |
|
|
98 |
|
|
|
99 |
|
|
|
100 |
The symbol is a debugging symbol. |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
R |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
The symbol is in a read only data section. |
|
|
107 |
|
|
|
108 |
|
|
|
109 |
S |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
The symbol is in an uninitialized data section for small |
|
|
113 |
objects. |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
T |
|
|
117 |
|
|
|
118 |
|
|
|
119 |
The symbol is in the text (code) section. |
|
|
120 |
|
|
|
121 |
|
|
|
122 |
U |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
The symbol is undefined. |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
V |
|
|
129 |
|
|
|
130 |
|
|
|
131 |
The symbol is a weak object. When a weak defined symbol is |
|
|
132 |
linked with a normal defined symbol, the normal defined |
|
|
133 |
symbol is used with no error. When a weak undefined symbol |
|
|
134 |
is linked and the symbol is not defined, the value of the |
|
|
135 |
weak symbol becomes zero with no error. |
|
|
136 |
|
|
|
137 |
|
|
|
138 |
W |
|
|
139 |
|
|
|
140 |
|
|
|
141 |
The symbol is a weak symbol that has not been specifically |
|
|
142 |
tagged as a weak object symbol. When a weak defined symbol |
|
|
143 |
is linked with a normal defined symbol, the normal defined |
|
|
144 |
symbol is used with no error. When a weak undefined symbol |
|
|
145 |
is linked and the symbol is not defined, the value of the |
|
|
146 |
weak symbol becomes zero with no error. |
|
|
147 |
|
|
|
148 |
|
|
|
149 |
- |
|
|
150 |
|
|
|
151 |
|
|
|
152 |
The symbol is a stabs symbol in an a.out object file. In |
|
|
153 |
this case, the next values printed are the stabs other |
|
|
154 |
field, the stabs desc field, and the stab type. Stabs |
|
|
155 |
symbols are used to hold debugging information. |
|
|
156 |
|
|
|
157 |
|
|
|
158 |
? |
|
|
159 |
|
|
|
160 |
|
|
|
161 |
The symbol type is unknown, or object file format |
|
|
162 |
specific. |
|
|
163 |
|
|
|
164 |
|
|
|
165 |
The symbol name. |
|
|
166 |
!!OPTIONS |
|
|
167 |
|
|
|
168 |
|
|
|
169 |
The long and short forms of options, shown here as |
|
|
170 |
alternatives, are equivalent. |
|
|
171 |
|
|
|
172 |
|
|
|
173 |
__-A__ |
|
|
174 |
|
|
|
175 |
|
|
|
176 |
__-o__ |
|
|
177 |
|
|
|
178 |
|
|
|
179 |
__--print-file-name__ |
|
|
180 |
|
|
|
181 |
|
|
|
182 |
Precede each symbol by the name of the input file (or |
|
|
183 |
archive member) in which it was found, rather than |
|
|
184 |
identifying the input file once only, before all of its |
|
|
185 |
symbols. |
|
|
186 |
|
|
|
187 |
|
|
|
188 |
__-a__ |
|
|
189 |
|
|
|
190 |
|
|
|
191 |
__--debug-syms__ |
|
|
192 |
|
|
|
193 |
|
|
|
194 |
Display all symbols, even debugger-only symbols; normally |
|
|
195 |
these are not listed. |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
__-B__ |
|
|
199 |
|
|
|
200 |
|
|
|
201 |
The same as __--format=bsd__ (for compatibility with the |
|
|
202 |
MIPS __nm__). |
|
|
203 |
|
|
|
204 |
|
|
|
205 |
__-C__ |
|
|
206 |
|
|
|
207 |
|
|
|
208 |
__--demangle[[=__''style''__]__ |
|
|
209 |
|
|
|
210 |
|
|
|
211 |
Decode (''demangle'') low-level symbol names into |
|
|
212 |
user-level names. Besides removing any initial underscore |
|
|
213 |
prepended by the system, this makes C ++ |
|
|
214 |
function names readable. Different compilers have different |
|
|
215 |
mangling styles. The optional demangling style argument can |
|
|
216 |
be used to choose an appropriate demangling style for your |
|
|
217 |
compiler. |
|
|
218 |
|
|
|
219 |
|
|
|
220 |
__--no-demangle__ |
|
|
221 |
|
|
|
222 |
|
|
|
223 |
Do not demangle low-level symbol names. This is the |
|
|
224 |
default. |
|
|
225 |
|
|
|
226 |
|
|
|
227 |
__-D__ |
|
|
228 |
|
|
|
229 |
|
|
|
230 |
__--dynamic__ |
|
|
231 |
|
|
|
232 |
|
|
|
233 |
Display the dynamic symbols rather than the normal symbols. |
|
|
234 |
This is only meaningful for dynamic objects, such as certain |
|
|
235 |
types of shared libraries. |
|
|
236 |
|
|
|
237 |
|
|
|
238 |
__-f__ ''format'' |
|
|
239 |
|
|
|
240 |
|
|
|
241 |
__--format=__''format'' |
|
|
242 |
|
|
|
243 |
|
|
|
244 |
Use the output format ''format'', which can be |
|
|
245 |
bsd, sysv, or posix. The default |
|
|
246 |
is bsd. Only the first character of ''format'' |
|
|
247 |
is significant; it can be either upper or lower |
|
|
248 |
case. |
|
|
249 |
|
|
|
250 |
|
|
|
251 |
__-g__ |
|
|
252 |
|
|
|
253 |
|
|
|
254 |
__--extern-only__ |
|
|
255 |
|
|
|
256 |
|
|
|
257 |
Display only external symbols. |
|
|
258 |
|
|
|
259 |
|
|
|
260 |
__-l__ |
|
|
261 |
|
|
|
262 |
|
|
|
263 |
__--line-numbers__ |
|
|
264 |
|
|
|
265 |
|
|
|
266 |
For each symbol, use debugging information to try to find a |
|
|
267 |
filename and line number. For a defined symbol, look for the |
|
|
268 |
line number of the address of the symbol. For an undefined |
|
|
269 |
symbol, look for the line number of a relocation entry which |
|
|
270 |
refers to the symbol. If line number information can be |
|
|
271 |
found, print it after the other symbol |
|
|
272 |
information. |
|
|
273 |
|
|
|
274 |
|
|
|
275 |
__-n__ |
|
|
276 |
|
|
|
277 |
|
|
|
278 |
__-v__ |
|
|
279 |
|
|
|
280 |
|
|
|
281 |
__--numeric-sort__ |
|
|
282 |
|
|
|
283 |
|
|
|
284 |
Sort symbols numerically by their addresses, rather than |
|
|
285 |
alphabetically by their names. |
|
|
286 |
|
|
|
287 |
|
|
|
288 |
__-p__ |
|
|
289 |
|
|
|
290 |
|
|
|
291 |
__--no-sort__ |
|
|
292 |
|
|
|
293 |
|
|
|
294 |
Do not bother to sort the symbols in any order; print them |
|
|
295 |
in the order encountered. |
|
|
296 |
|
|
|
297 |
|
|
|
298 |
__-P__ |
|
|
299 |
|
|
|
300 |
|
|
|
301 |
__--portability__ |
|
|
302 |
|
|
|
303 |
|
|
|
304 |
Use the POSIX .2 standard output format |
|
|
305 |
instead of the default format. Equivalent to __-f |
|
|
306 |
posix__. |
|
|
307 |
|
|
|
308 |
|
|
|
309 |
__-s__ |
|
|
310 |
|
|
|
311 |
|
|
|
312 |
__--print-armap__ |
|
|
313 |
|
|
|
314 |
|
|
|
315 |
When listing symbols from archive members, include the |
|
|
316 |
index: a mapping (stored in the archive by __ar__ or |
|
|
317 |
__ranlib__) of which modules contain definitions for |
|
|
318 |
which names. |
|
|
319 |
|
|
|
320 |
|
|
|
321 |
__-r__ |
|
|
322 |
|
|
|
323 |
|
|
|
324 |
__--reverse-sort__ |
|
|
325 |
|
|
|
326 |
|
|
|
327 |
Reverse the order of the sort (whether numeric or |
|
|
328 |
alphabetic); let the last come first. |
|
|
329 |
|
|
|
330 |
|
|
|
331 |
__--size-sort__ |
|
|
332 |
|
|
|
333 |
|
|
|
334 |
Sort symbols by size. The size is computed as the difference |
|
|
335 |
between the value of the symbol and the value of the symbol |
|
|
336 |
with the next higher value. The size of the symbol is |
|
|
337 |
printed, rather than the value. |
|
|
338 |
|
|
|
339 |
|
|
|
340 |
__-t__ ''radix'' |
|
|
341 |
|
|
|
342 |
|
|
|
343 |
__--radix=__''radix'' |
|
|
344 |
|
|
|
345 |
|
|
|
346 |
Use ''radix'' as the radix for printing the symbol |
|
|
347 |
values. It must be __d__ for decimal, __o__ for octal, |
|
|
348 |
or __x__ for hexadecimal. |
|
|
349 |
|
|
|
350 |
|
|
|
351 |
__--target=__''bfdname'' |
|
|
352 |
|
|
|
353 |
|
|
|
354 |
Specify an object code format other than your system's |
|
|
355 |
default format. |
|
|
356 |
|
|
|
357 |
|
|
|
358 |
__-u__ |
|
|
359 |
|
|
|
360 |
|
|
|
361 |
__--undefined-only__ |
|
|
362 |
|
|
|
363 |
|
|
|
364 |
Display only undefined symbols (those external to each |
|
|
365 |
object file). |
|
|
366 |
|
|
|
367 |
|
|
|
368 |
__--defined-only__ |
|
|
369 |
|
|
|
370 |
|
|
|
371 |
Display only defined symbols for each object |
|
|
372 |
file. |
|
|
373 |
|
|
|
374 |
|
|
|
375 |
__-V__ |
|
|
376 |
|
|
|
377 |
|
|
|
378 |
__--version__ |
|
|
379 |
|
|
|
380 |
|
|
|
381 |
Show the version number of __nm__ and exit. |
|
|
382 |
|
|
|
383 |
|
|
|
384 |
__-X__ |
|
|
385 |
|
|
|
386 |
|
|
|
387 |
This option is ignored for compatibility with the |
|
|
388 |
AIX version of __nm__. It takes one |
|
|
389 |
parameter which must be the string __32_64__. The default |
|
|
390 |
mode of AIX __nm__ corresponds to __-X |
|
|
391 |
32__, which is not supported by GNU |
|
|
392 |
__nm__. |
|
|
393 |
|
|
|
394 |
|
|
|
395 |
__--help__ |
|
|
396 |
|
|
|
397 |
|
|
|
398 |
Show a summary of the options to __nm__ and |
|
|
399 |
exit. |
|
|
400 |
!!SEE ALSO |
|
|
401 |
|
|
|
402 |
|
|
|
403 |
ar(1), objdump(1), ranlib(1), and the |
|
|
404 |
Info entries for ''binutils''. |
|
|
405 |
!!COPYRIGHT |
|
|
406 |
|
|
|
407 |
|
|
|
408 |
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, |
|
|
409 |
2001, 2002 Free Software Foundation, Inc. |
|
|
410 |
|
|
|
411 |
|
|
|
412 |
Permission is granted to copy, distribute and/or modify this |
|
|
413 |
document under the terms of the GNU Free |
|
|
414 |
Documentation License, Version 1.1 or any later version |
|
|
415 |
published by the Free Software Foundation; with no Invariant |
|
|
416 |
Sections, with no Front-Cover Texts, and with no Back-Cover |
|
|
417 |
Texts. A copy of the license is included in the section |
|
|
418 |
entitled `` GNU Free Documentation |
|
|
419 |
License''. |
|
|
420 |
---- |