Fix typos in ChangeLogs and update copyright notices
[deliverable/binutils-gdb.git] / binutils / nm.1
CommitLineData
8c2bc687
NC
1.\" Copyright 1991, 1992, 1993, 1994, 1995, 1996, 2000
2.\" Free Software Foundation, Inc.
252b5132 3.\" See section COPYING for conditions for redistribution
cf055d54 4.TH nm 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools"
252b5132
RH
5.de BP
6.sp
7.ti \-.2i
8\(**
9..
10
11.SH NAME
12nm \- list symbols from object files.
13
14.SH SYNOPSIS
15.hy 0
16.na
17.TP
18.B nm
19.RB "[\|" \-a | \-\-debug\-syms "\|]"
20.RB "[\|" \-g | \-\-extern\-only "\|]"
21.RB "[\|" \-B "\|]"
22.RB "[\|" \-C | \-\-demangle "\|]"
23.RB "[\|" \-D | \-\-dynamic "\|]"
24.RB "[\|" \-s | \-\-print\-armap "\|]"
25.RB "[\|" \-o | \-\-print\-file\-name "\|]"
26.RB "[\|" \-n | \-\-numeric\-sort "\|]"
27.RB "[\|" \-p | \-\-no\-sort "\|]"
28.RB "[\|" \-r | \-\-reverse\-sort "\|]"
29.RB "[\|" \-\-size\-sort "\|]"
30.RB "[\|" \-u | \-\-undefined\-only "\|]"
31.RB "[\|" \-l | \-\-line\-numbers "\|]"
32.RB "[\|" \-\-help "\|]"
33.RB "[\|" \-\-version "\|]"
34.RB "[\|" "\-t \fIradix" | \-\-radix=\fIradix "\|]"
35.RB "[\|" \-P | --portability "\|]"
36.RB "[\|" "\-f \fIformat" | \-\-format=\fIformat "\|]"
37.RB "[\|" "\-\-target=\fIbfdname" "\|]"
38.RB "[\|" \c
39.I objfile\c
40\&.\|.\|.\|]
41.ad b
42.hy 1
43.SH DESCRIPTION
44GNU \c
45.B nm\c
46\& lists the symbols from object files \c
47.I objfile\c
48\&. If no object files are given as arguments, \c
49.B nm\c
50\& assumes `\|\c
51.B a.out\c
52\|'.
53
54.SH OPTIONS
55The long and short forms of options, shown here as alternatives, are
56equivalent.
57
58.TP
59.B \-A
60.TP
61.B \-o
62.TP
63.B \-\-print\-file\-name
64Precede each symbol by the name of the input file where it was found,
65rather than identifying the input file once only before all of its
66symbols.
67
68.TP
69.B \-a
70.TP
71.B \-\-debug\-syms
72Display debugger-only symbols; normally these are not listed.
73
74.TP
75.B \-B
76The same as
77.B \-\-format=bsd
78(for compatibility with the MIPS \fBnm\fP).
79
80.TP
81.B \-C
82.TP
83.B \-\-demangle
84Decode (\fIdemangle\fP) low-level symbol names into user-level names.
85Besides removing any initial underscore prepended by the system, this
86makes C++ function names readable.
87
88.TP
89.B \-D
90.TP
91.B \-\-dynamic
92Display the dynamic symbols rather than the normal symbols. This is
93only meaningful for dynamic objects, such as certain types of shared
94libraries.
95
96.TP
97.B "\-f \fIformat"
98Use the output format \fIformat\fP, which can be ``bsd'',
99``sysv'', or ``posix''. The default is ``bsd''.
100Only the first character of \fIformat\fP is significant; it can be
101either upper or lower case.
102
103.TP
104.B \-g
105.TP
106.B \-\-extern\-only
107Display only external symbols.
108
109.TP
110.B \-n
111.TP
112.B \-v
113.TP
114.B \-\-numeric\-sort
115Sort symbols numerically by their addresses, not alphabetically by their
116names.
117
118.TP
119.B \-p
120.TP
121.B \-\-no\-sort
122Don't bother to sort the symbols in any order; just print them in the
123order encountered.
124
125.TP
126.B \-P
127.TP
128.B \-\-portability
129Use the POSIX.2 standard output format instead of the default format.
130Equivalent to ``\-f posix''.
131
132.TP
133.B \-s
134.TP
135.B \-\-print\-armap
136When listing symbols from archive members, include the index: a mapping
137(stored in the archive by \c
138.B ar\c
139\& or \c
140.B ranlib\c
141\&) of what modules
142contain definitions for what names.
143
144.TP
145.B \-r
146.TP
147.B \-\-reverse\-sort
148Reverse the sense of the sort (whether numeric or alphabetic); let the
149last come first.
150
151.TP
152.B \-\-size\-sort
153Sort symbols by size. The size is computed as the difference between
154the value of the symbol and the value of the symbol with the next higher
155value. The size of the symbol is printed, rather than the value.
156
157.TP
158.B "\-t \fIradix"
159.TP
160.B "\-\-radix=\fIradix"
161Use \fIradix\fP as the radix for printing the symbol values. It must be
162``d'' for decimal, ``o'' for octal, or ``x'' for hexadecimal.
163
164.TP
165.BI "\-\-target=" "bfdname"
166Specify an object code format other than your system's default format.
167See
168.BR objdump ( 1 ),
169for information on listing available formats.
170
171.TP
172.B \-u
173.TP
174.B \-\-undefined\-only
175Display only undefined symbols (those external to each object file).
176
177.TP
178.B \-l
179.TP
180.B \-\-line\-numbers
181For each symbol, use debugging information to try to find a filename and
182line number. For a defined symbol, look for the line number of the
183address of the symbol. For an undefined symbol, look for the line
184number of a relocation entry which refers to the symbol. If line number
185information can be found, print it after the other symbol information.
186
187.TP
188.B \-V
189.TP
190.B \-\-version
191Show the version number of
192.B nm
193and exit.
194
195.TP
196.B \-\-help
197Show a summary of the options to
198.B nm
199and exit.
200
201.SH "SEE ALSO"
202.RB "`\|" binutils "\|'"
203entry in
204.B
205info\c
206\&;
207.I
208The GNU Binary Utilities\c
209\&, Roland H. Pesch (October 1991);
210.BR ar "(" 1 "),"
211.BR objdump ( 1 ),
212.BR ranlib "(" 1 ")."
213
214
215.SH COPYING
cf055d54
NC
216Copyright (c) 1991, 2000 Free Software Foundation, Inc.
217.PP
218This document is distributed under the terms of the GNU Free
e47b9e39
NC
219Documentation License, version 1.1. That license is described in the
220sources for this manual page, but it is not displayed here in order to
221make this manual more consise. Copies of this license can also be
222obtained from: http://www.gnu.org/copyleft/.
cf055d54 223
e47b9e39
NC
224\" .SH GNU Free Documentation License
225\" Version 1.1, March 2000
cf055d54 226
e47b9e39
NC
227\" Copyright (C) 2000 Free Software Foundation, Inc.
228\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
cf055d54 229
e47b9e39
NC
230\" Everyone is permitted to copy and distribute verbatim
231\" copies of this license document, but changing it is
232\" not allowed.
233\" .PP
234\" 0. PREAMBLE
235\" .PP
236\" The purpose of this License is to make a manual, textbook, or other
237\" written document "free" in the sense of freedom: to assure everyone
238\" the effective freedom to copy and redistribute it, with or without
239\" modifying it, either commercially or noncommercially. Secondarily,
240\" this License preserves for the author and publisher a way to get
241\" credit for their work, while not being considered responsible for
242\" modifications made by others.
243\" .PP
244\" This License is a kind of "copyleft", which means that derivative
245\" works of the document must themselves be free in the same sense. It
246\" complements the GNU General Public License, which is a copyleft
247\" license designed for free software.
248\" .PP
249\" We have designed this License in order to use it for manuals for free
250\" software, because free software needs free documentation: a free
251\" program should come with manuals providing the same freedoms that the
252\" software does. But this License is not limited to software manuals;
253\" it can be used for any textual work, regardless of subject matter or
254\" whether it is published as a printed book. We recommend this License
255\" principally for works whose purpose is instruction or reference.
256\" .PP
257\" 1. APPLICABILITY AND DEFINITIONS
258\" .PP
259\" This License applies to any manual or other work that contains a
260\" notice placed by the copyright holder saying it can be distributed
261\" under the terms of this License. The "Document", below, refers to any
262\" such manual or work. Any member of the public is a licensee, and is
263\" addressed as "you".
264\" .PP
265\" A "Modified Version" of the Document means any work containing the
266\" Document or a portion of it, either copied verbatim, or with
267\" modifications and/or translated into another language.
268\" .PP
269\" A "Secondary Section" is a named appendix or a front-matter section of
270\" the Document that deals exclusively with the relationship of the
271\" publishers or authors of the Document to the Document's overall subject
272\" (or to related matters) and contains nothing that could fall directly
273\" within that overall subject. (For example, if the Document is in part a
274\" textbook of mathematics, a Secondary Section may not explain any
275\" mathematics.) The relationship could be a matter of historical
276\" connection with the subject or with related matters, or of legal,
277\" commercial, philosophical, ethical or political position regarding
278\" them.
279\" .PP
280\" The "Invariant Sections" are certain Secondary Sections whose titles
281\" are designated, as being those of Invariant Sections, in the notice
282\" that says that the Document is released under this License.
283\" .PP
284\" The "Cover Texts" are certain short passages of text that are listed,
285\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
286\" the Document is released under this License.
287\" .PP
288\" A "Transparent" copy of the Document means a machine-readable copy,
289\" represented in a format whose specification is available to the
290\" general public, whose contents can be viewed and edited directly and
291\" straightforwardly with generic text editors or (for images composed of
292\" pixels) generic paint programs or (for drawings) some widely available
293\" drawing editor, and that is suitable for input to text formatters or
294\" for automatic translation to a variety of formats suitable for input
295\" to text formatters. A copy made in an otherwise Transparent file
296\" format whose markup has been designed to thwart or discourage
297\" subsequent modification by readers is not Transparent. A copy that is
298\" not "Transparent" is called "Opaque".
299\" .PP
300\" Examples of suitable formats for Transparent copies include plain
301\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
302\" or XML using a publicly available DTD, and standard-conforming simple
303\" HTML designed for human modification. Opaque formats include
304\" PostScript, PDF, proprietary formats that can be read and edited only
305\" by proprietary word processors, SGML or XML for which the DTD and/or
306\" processing tools are not generally available, and the
307\" machine-generated HTML produced by some word processors for output
308\" purposes only.
309\" .PP
310\" The "Title Page" means, for a printed book, the title page itself,
311\" plus such following pages as are needed to hold, legibly, the material
312\" this License requires to appear in the title page. For works in
313\" formats which do not have any title page as such, "Title Page" means
314\" the text near the most prominent appearance of the work's title,
315\" preceding the beginning of the body of the text.
316\" .PP
317\" 2. VERBATIM COPYING
318\" .PP
319\" You may copy and distribute the Document in any medium, either
320\" commercially or noncommercially, provided that this License, the
321\" copyright notices, and the license notice saying this License applies
322\" to the Document are reproduced in all copies, and that you add no other
323\" conditions whatsoever to those of this License. You may not use
324\" technical measures to obstruct or control the reading or further
325\" copying of the copies you make or distribute. However, you may accept
326\" compensation in exchange for copies. If you distribute a large enough
327\" number of copies you must also follow the conditions in section 3.
328\" .PP
329\" You may also lend copies, under the same conditions stated above, and
330\" you may publicly display copies.
331\" .PP
332\" 3. COPYING IN QUANTITY
333\" .PP
334\" If you publish printed copies of the Document numbering more than 100,
335\" and the Document's license notice requires Cover Texts, you must enclose
336\" the copies in covers that carry, clearly and legibly, all these Cover
337\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
338\" the back cover. Both covers must also clearly and legibly identify
339\" you as the publisher of these copies. The front cover must present
340\" the full title with all words of the title equally prominent and
341\" visible. You may add other material on the covers in addition.
342\" Copying with changes limited to the covers, as long as they preserve
343\" the title of the Document and satisfy these conditions, can be treated
344\" as verbatim copying in other respects.
345\" .PP
346\" If the required texts for either cover are too voluminous to fit
347\" legibly, you should put the first ones listed (as many as fit
348\" reasonably) on the actual cover, and continue the rest onto adjacent
349\" pages.
350\" .PP
351\" If you publish or distribute Opaque copies of the Document numbering
352\" more than 100, you must either include a machine-readable Transparent
353\" copy along with each Opaque copy, or state in or with each Opaque copy
354\" a publicly-accessible computer-network location containing a complete
355\" Transparent copy of the Document, free of added material, which the
356\" general network-using public has access to download anonymously at no
357\" charge using public-standard network protocols. If you use the latter
358\" option, you must take reasonably prudent steps, when you begin
359\" distribution of Opaque copies in quantity, to ensure that this
360\" Transparent copy will remain thus accessible at the stated location
361\" until at least one year after the last time you distribute an Opaque
362\" copy (directly or through your agents or retailers) of that edition to
363\" the public.
364\" .PP
365\" It is requested, but not required, that you contact the authors of the
366\" Document well before redistributing any large number of copies, to give
367\" them a chance to provide you with an updated version of the Document.
368\" .PP
369\" 4. MODIFICATIONS
370\" .PP
371\" You may copy and distribute a Modified Version of the Document under
372\" the conditions of sections 2 and 3 above, provided that you release
373\" the Modified Version under precisely this License, with the Modified
374\" Version filling the role of the Document, thus licensing distribution
375\" and modification of the Modified Version to whoever possesses a copy
376\" of it. In addition, you must do these things in the Modified Version:
377\" .PP
378\" A. Use in the Title Page (and on the covers, if any) a title distinct
379\" from that of the Document, and from those of previous versions
380\" (which should, if there were any, be listed in the History section
381\" of the Document). You may use the same title as a previous version
382\" if the original publisher of that version gives permission.
383\" .PP
384\" B. List on the Title Page, as authors, one or more persons or entities
385\" responsible for authorship of the modifications in the Modified
386\" Version, together with at least five of the principal authors of the
387\" Document (all of its principal authors, if it has less than five).
388\" .PP
389\" C. State on the Title page the name of the publisher of the
390\" Modified Version, as the publisher.
391\" .PP
392\" D. Preserve all the copyright notices of the Document.
393\" .PP
394\" E. Add an appropriate copyright notice for your modifications
395\" adjacent to the other copyright notices.
396\" .PP
397\" F. Include, immediately after the copyright notices, a license notice
398\" giving the public permission to use the Modified Version under the
399\" terms of this License, in the form shown in the Addendum below.
400\" Preserve in that license notice the full lists of Invariant Sections
401\" and required Cover Texts given in the Document's license notice.
402\" .PP
403\" H. Include an unaltered copy of this License.
404\" .PP
405\" I. Preserve the section entitled "History", and its title, and add to
406\" it an item stating at least the title, year, new authors, and
407\" publisher of the Modified Version as given on the Title Page. If
408\" there is no section entitled "History" in the Document, create one
409\" stating the title, year, authors, and publisher of the Document as
410\" given on its Title Page, then add an item describing the Modified
411\" Version as stated in the previous sentence.
412\" .PP
413\" J. Preserve the network location, if any, given in the Document for
414\" public access to a Transparent copy of the Document, and likewise
415\" the network locations given in the Document for previous versions
416\" it was based on. These may be placed in the "History" section.
417\" You may omit a network location for a work that was published at
418\" least four years before the Document itself, or if the original
419\" publisher of the version it refers to gives permission.
420\" .PP
421\" K. In any section entitled "Acknowledgements" or "Dedications",
422\" preserve the section's title, and preserve in the section all the
423\" substance and tone of each of the contributor acknowledgements
424\" and/or dedications given therein.
425\" .PP
426\" L. Preserve all the Invariant Sections of the Document,
427\" unaltered in their text and in their titles. Section numbers
428\" or the equivalent are not considered part of the section titles.
429\" .PP
430\" M. Delete any section entitled "Endorsements". Such a section
431\" may not be included in the Modified Version.
432\" .PP
433\" N. Do not retitle any existing section as "Endorsements"
434\" or to conflict in title with any Invariant Section.
435\" .PP
436\" If the Modified Version includes new front-matter sections or
437\" appendices that qualify as Secondary Sections and contain no material
438\" copied from the Document, you may at your option designate some or all
439\" of these sections as invariant. To do this, add their titles to the
440\" list of Invariant Sections in the Modified Version's license notice.
441\" These titles must be distinct from any other section titles.
442\" .PP
443\" You may add a section entitled "Endorsements", provided it contains
444\" nothing but endorsements of your Modified Version by various
445\" parties--for example, statements of peer review or that the text has
446\" been approved by an organization as the authoritative definition of a
447\" standard.
448\" .PP
449\" You may add a passage of up to five words as a Front-Cover Text, and a
450\" passage of up to 25 words as a Back-Cover Text, to the end of the list
451\" of Cover Texts in the Modified Version. Only one passage of
452\" Front-Cover Text and one of Back-Cover Text may be added by (or
453\" through arrangements made by) any one entity. If the Document already
454\" includes a cover text for the same cover, previously added by you or
455\" by arrangement made by the same entity you are acting on behalf of,
456\" you may not add another; but you may replace the old one, on explicit
457\" permission from the previous publisher that added the old one.
458\" .PP
459\" The author(s) and publisher(s) of the Document do not by this License
460\" give permission to use their names for publicity for or to assert or
461\" imply endorsement of any Modified Version.
462\" .PP
463
464\" 5. COMBINING DOCUMENTS
465\" .PP
466\" You may combine the Document with other documents released under this
467\" License, under the terms defined in section 4 above for modified
468\" versions, provided that you include in the combination all of the
469\" Invariant Sections of all of the original documents, unmodified, and
470\" list them all as Invariant Sections of your combined work in its
471\" license notice.
472\" .PP
473\" The combined work need only contain one copy of this License, and
474\" multiple identical Invariant Sections may be replaced with a single
475\" copy. If there are multiple Invariant Sections with the same name but
476\" different contents, make the title of each such section unique by
477\" adding at the end of it, in parentheses, the name of the original
478\" author or publisher of that section if known, or else a unique number.
479\" Make the same adjustment to the section titles in the list of
480\" Invariant Sections in the license notice of the combined work.
481\" .PP
482\" In the combination, you must combine any sections entitled "History"
483\" in the various original documents, forming one section entitled
484\" "History"; likewise combine any sections entitled "Acknowledgements",
485\" and any sections entitled "Dedications". You must delete all sections
486\" entitled "Endorsements."
487\" .PP
488
489\" 6. COLLECTIONS OF DOCUMENTS
490\" .PP
491\" You may make a collection consisting of the Document and other documents
492\" released under this License, and replace the individual copies of this
493\" License in the various documents with a single copy that is included in
494\" the collection, provided that you follow the rules of this License for
495\" verbatim copying of each of the documents in all other respects.
496\" .PP
497\" You may extract a single document from such a collection, and distribute
498\" it individually under this License, provided you insert a copy of this
499\" License into the extracted document, and follow this License in all
500\" other respects regarding verbatim copying of that document.
501\" .PP
502
503\" 7. AGGREGATION WITH INDEPENDENT WORKS
504\" .PP
505\" A compilation of the Document or its derivatives with other separate
506\" and independent documents or works, in or on a volume of a storage or
507\" distribution medium, does not as a whole count as a Modified Version
508\" of the Document, provided no compilation copyright is claimed for the
509\" compilation. Such a compilation is called an "aggregate", and this
510\" License does not apply to the other self-contained works thus compiled
511\" with the Document, on account of their being thus compiled, if they
512\" are not themselves derivative works of the Document.
513\" .PP
514\" If the Cover Text requirement of section 3 is applicable to these
515\" copies of the Document, then if the Document is less than one quarter
516\" of the entire aggregate, the Document's Cover Texts may be placed on
517\" covers that surround only the Document within the aggregate.
518\" Otherwise they must appear on covers around the whole aggregate.
519\" .PP
520
521\" 8. TRANSLATION
522\" .PP
523\" Translation is considered a kind of modification, so you may
524\" distribute translations of the Document under the terms of section 4.
525\" Replacing Invariant Sections with translations requires special
526\" permission from their copyright holders, but you may include
527\" translations of some or all Invariant Sections in addition to the
528\" original versions of these Invariant Sections. You may include a
529\" translation of this License provided that you also include the
530\" original English version of this License. In case of a disagreement
531\" between the translation and the original English version of this
532\" License, the original English version will prevail.
533\" .PP
534
535\" 9. TERMINATION
536\" .PP
537\" You may not copy, modify, sublicense, or distribute the Document except
538\" as expressly provided for under this License. Any other attempt to
539\" copy, modify, sublicense or distribute the Document is void, and will
540\" automatically terminate your rights under this License. However,
541\" parties who have received copies, or rights, from you under this
542\" License will not have their licenses terminated so long as such
543\" parties remain in full compliance.
544\" .PP
545
546\" 10. FUTURE REVISIONS OF THIS LICENSE
547\" .PP
548\" The Free Software Foundation may publish new, revised versions
549\" of the GNU Free Documentation License from time to time. Such new
550\" versions will be similar in spirit to the present version, but may
551\" differ in detail to address new problems or concerns. See
552\" http://www.gnu.org/copyleft/.
553\" .PP
554\" Each version of the License is given a distinguishing version number.
555\" If the Document specifies that a particular numbered version of this
556\" License "or any later version" applies to it, you have the option of
557\" following the terms and conditions either of that specified version or
558\" of any later version that has been published (not as a draft) by the
559\" Free Software Foundation. If the Document does not specify a version
560\" number of this License, you may choose any version ever published (not
561\" as a draft) by the Free Software Foundation.
562\" .PP
563
564\" ADDENDUM: How to use this License for your documents
565\" .PP
566\" To use this License in a document you have written, include a copy of
567\" the License in the document and put the following copyright and
568\" license notices just after the title page:
569\" .PP
570\" Copyright (c) YEAR YOUR NAME.
571\" Permission is granted to copy, distribute and/or
572\" modify this document under the terms of the GNU
573\" Free Documentation License, Version 1.1 or any later
574\" version published by the Free Software Foundation;
575\" with the Invariant Sections being LIST THEIR TITLES,
576\" with the Front-Cover Texts being LIST, and with the
577\" Back-Cover Texts being LIST. A copy of the license
578\" is included in the section entitled "GNU Free
579\" Documentation License".
580\" .PP
581\" If you have no Invariant Sections, write "with no Invariant Sections"
582\" instead of saying which ones are invariant. If you have no
583\" Front-Cover Texts, write "no Front-Cover Texts" instead of
584\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
585\" .PP
586\" If your document contains nontrivial examples of program code, we
587\" recommend releasing these examples in parallel under your choice of
588\" free software license, such as the GNU General Public License,
589\" to permit their use in free software.
This page took 0.102707 seconds and 4 git commands to generate.