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