* ltconfig: Update cygwin32 support.
[deliverable/binutils-gdb.git] / binutils / objdump.1
CommitLineData
54f74247 1.\" Copyright (c) 1991, 1996, 1997 Free Software Foundation
19450a0c 2.\" See section COPYING for conditions for redistribution
19450a0c
RP
3.TH objdump 1 "5 November 1991" "cygnus support" "GNU Development Tools"
4.de BP
5.sp
6.ti \-.2i
7\(**
8..
9
10.SH NAME
938fa52b 11objdump \- display information from object files.
19450a0c
RP
12
13.SH SYNOPSIS
14.hy 0
15.na
16.TP
b26ac613 17.B objdump
eae04238 18.RB "[\|" \-a | \-\-archive\-headers "\|]"
19450a0c
RP
19.RB "[\|" "\-b\ "\c
20.I bfdname\c
eae04238
DM
21.RB " | " "\-\-target="\c
22.I bfdname\c
19450a0c 23\&\|]
9793039f 24.RB "[\|" \-C | \-\-demangle "\|]"
e1c14599 25.RB "[\|" \-\-debugging "\|]"
eae04238 26.RB "[\|" \-d | \-\-disassemble "\|]"
d5464baa 27.RB "[\|" \-D | \-\-disassemble-all "\|]"
51b8c416 28.RB "[\|" \-\-disassemble\-zeroes "\|]"
67c8c901
ILT
29.RB "[\|" \-EB | \-EL | \-\-endian=\c
30.I {big|little}\c
31\&\|]
eae04238
DM
32.RB "[\|" \-f | \-\-file\-headers "\|]"
33.RB "[\|" \-h | \-\-section\-headers
34.RB "| " \-\-headers "\|]"
35.RB "[\|" \-i | \-\-info "\|]"
19450a0c
RP
36.RB "[\|" "\-j\ "\c
37.I section\c
eae04238
DM
38.RB " | " "\-\-section="\c
39.I section\c
19450a0c 40\&\|]
eae04238 41.RB "[\|" \-l | \-\-line\-numbers "\|]"
19450a0c
RP
42.RB "[\|" "\-m\ "\c
43.I machine\c
eae04238
DM
44.RB " | " "\-\-architecture="\c
45.I machine\c
19450a0c 46\&\|]
4cb99ff2 47.RB "[\|" \-\-prefix\-addresses "\|]"
1f72cab1 48.RB "[\|" \-r | \-\-reloc "\|]"
de3b08ac 49.RB "[\|" \-R | \-\-dynamic\-reloc "\|]"
eae04238 50.RB "[\|" \-s | \-\-full\-contents "\|]"
a8e27cc6 51.RB "[\|" \-S | \-\-source "\|]"
5c59269f 52.RB "[\|" \-\-[no\-]show\-raw\-insn "\|]"
1f72cab1
DM
53.RB "[\|" \-\-stabs "\|]"
54.RB "[\|" \-t | \-\-syms "\|]"
de3b08ac 55.RB "[\|" \-T | \-\-dynamic\-syms "\|]"
eae04238 56.RB "[\|" \-x | \-\-all\-headers "\|]"
aa21a2a9
ILT
57.RB "[\|" "\-\-start\-address="\c
58.I address\c
59\&\|]
60.RB "[\|" "\-\-stop\-address="\c
61.I address\c
62\&\|]
ab3a59cf
ILT
63.RB "[\|" "\-\-adjust\-vma="\c
64.I offset\c
65\&\|]
b26ac613
DM
66.RB "[\|" \-\-version "\|]"
67.RB "[\|" \-\-help "\|]"
1f72cab1 68.I objfile\c
19450a0c
RP
69\&.\|.\|.
70.ad b
71.hy 1
72.SH DESCRIPTION
73\c
74.B objdump\c
75\& displays information about one or more object files.
76The options control what particular information to display. This
77information is mostly useful to programmers who are working on the
78compilation tools, as opposed to programmers who just want their
79program to compile and work.
b26ac613 80.PP
1f72cab1 81.IR "objfile" .\|.\|.
b26ac613 82are the object files to be examined. When you specify archives,
19450a0c
RP
83\c
84.B objdump\c
85\& shows information on each of the member object files.
86
b26ac613
DM
87.SH OPTIONS
88Where long and short forms of an option are shown together, they are
ed78872a
DM
89equivalent. At least one option besides
90.B \-l
eae04238 91(\fB\-\-line\-numbers\fP) must be given.
b26ac613 92
19450a0c
RP
93.TP
94.B \-a
eae04238
DM
95.TP
96.B \-\-archive\-headers
19450a0c 97If any files from \c
1f72cab1 98.I objfile\c
19450a0c
RP
99\& are archives, display the archive
100header information (in a format similar to `\|\c
101.B ls \-l\c
102\|'). Besides the
103information you could list with `\|\c
104.B ar tv\c
105\|', `\|\c
106.B objdump \-a\c
107\|' shows
108the object file format of each archive member.
109
ab3a59cf
ILT
110.TP
111.BI "\-\-adjust\-vma=" "offset"
112When dumping information, first add
113.I offset
114to all the section addresses. This is useful if the section addresses
115do not correspond to the symbol table, which can happen when putting
116sections at particular addresses when using a format which can not
117represent section addresses, such as a.out.
118
19450a0c 119.TP
eae04238
DM
120.BI "\-b " "bfdname"\c
121.TP
5740d9df 122.BI "\-\-target=" "bfdname"
b26ac613 123Specify the object-code format for the object files to be
19450a0c
RP
124\c
125.I bfdname\c
126\&. This may not be necessary; \c
127.I objdump\c
128\& can
129automatically recognize many formats. For example,
130.sp
131.br
132objdump\ \-b\ oasys\ \-m\ vax\ \-h\ fu.o
133.br
134.sp
b26ac613 135display summary information from the section headers (`\|\c
19450a0c
RP
136.B \-h\c
137\|') of
138`\|\c
139.B fu.o\c
140\|', which is explicitly identified (`\|\c
141.B \-m\c
142\|') as a Vax object
143file in the format produced by Oasys compilers. You can list the
144formats available with the `\|\c
145.B \-i\c
146\|' option.
147
9793039f
ILT
148.TP
149.B \-C
150.TP
151.B \-\-demangle
152Decode (\fIdemangle\fP) low-level symbol names into user-level names.
153Besides removing any initial underscore prepended by the system, this
154makes C++ function names readable.
155
e1c14599
ILT
156.TP
157.B \-\-debugging
158Display debugging information. This attempts to parse debugging
159information stored in the file and print it out using a C like syntax.
160Only certain types of debugging information have been implemented.
161
19450a0c
RP
162.TP
163.B \-d
eae04238
DM
164.TP
165.B \-\-disassemble
166Display the assembler mnemonics for the machine
19450a0c 167instructions from \c
1f72cab1 168.I objfile\c
19450a0c 169\&.
d5464baa
ILT
170This option only disassembles those sections which are
171expected to contain instructions.
172
173.TP
174.B \-D
175.TP
176.B \-\-disassemble-all
177Like \fB\-d\fP, but disassemble the contents of all sections, not just
178those expected to contain instructions.
19450a0c 179
51b8c416
ILT
180.TP
181.B \-\-prefix\-addresses
182When disassembling, print the complete address on each line. This is
183the older disassembly format.
184
185.TP
186.B \-\-disassemble\-zeroes
187Normally the disassembly output will skip blocks of zeroes. This
188option directs the disassembler to disassemble those blocks, just like
189any other data.
190
67c8c901
ILT
191.TP
192.B \-EB
193.TP
194.B \-EL
195.TP
196.BI "\-\-endian=" "{big|little}"
197Specify the endianness of the object files. This only affects
198disassembly. This can be useful when disassembling a file format which
199does not describe endianness information, such as S-records.
200
19450a0c
RP
201.TP
202.B \-f
eae04238
DM
203.TP
204.B \-\-file\-headers
205Display summary information from the overall header of
19450a0c 206each file in \c
1f72cab1 207.I objfile\c
19450a0c
RP
208\&.
209
210.TP
211.B \-h
212.TP
eae04238
DM
213.B \-\-section\-headers
214.TP
215.B \-\-headers
216Display summary information from the section headers of the
19450a0c
RP
217object file.
218
b26ac613
DM
219.TP
220.B \-\-help
221Print a summary of the options to
222.B objdump
223and exit.
224
19450a0c
RP
225.TP
226.B \-i
eae04238
DM
227.TP
228.B \-\-info
19450a0c
RP
229Display a list showing all architectures and object formats available
230for specification with \c
231.B \-b\c
232\& or \c
233.B \-m\c
234\&.
235
236.TP
eae04238
DM
237.BI "\-j " "name"\c
238.TP
5740d9df 239.BI "\-\-section=" "name"
19450a0c
RP
240Display information only for section \c
241.I name\c
5740d9df 242\&.
19450a0c
RP
243
244.TP
245.B \-l
eae04238
DM
246.TP
247.B \-\-line\-numbers
248Label the display (using debugging information) with the filename
249and source line numbers corresponding to the object code shown.
11548211 250Only useful with \fB\-d\fP, \fB\-D\fP, or \fB\-r\fP.
19450a0c
RP
251
252.TP
eae04238
DM
253.BI "\-m " "machine"\c
254.TP
5740d9df 255.BI "\-\-architecture=" "machine"
67c8c901 256Specify the architecture to use when disassembling object files. This
a1535f42 257can be useful when disassembling object files which do not describe
67c8c901
ILT
258architecture information, such as S-records. You can list the available
259architectures with the \fB\-i\fP option.
19450a0c
RP
260
261.TP
262.B \-r
263.TP
1f72cab1 264.B \-\-reloc
d5464baa
ILT
265Print the relocation entries of the file. If used with \fB\-d\fP or
266\fB\-d\fP, the relocations are printed interspersed with the
267disassembly.
19450a0c 268
de3b08ac
ILT
269.TP
270.B \-R
271.TP
272.B \-\-dynamic\-reloc
273Print the dynamic relocation entries of the file. This is only
274meaningful for dynamic objects, such as certain types of shared
275libraries.
276
19450a0c
RP
277.TP
278.B \-s
eae04238
DM
279.TP
280.B \-\-full\-contents
19450a0c
RP
281Display the full contents of any sections requested.
282
a8e27cc6
ILT
283.TP
284.B \-S
285.TP
286.B \-\-source
287Display source code intermixed with disassembly, if possible. Implies
288\fB-d\fP.
289
458bbd1f 290.TP
4cb99ff2 291.B \-\-show\-raw\-insn
458bbd1f 292When disassembling instructions, print the instruction in hex as well as
4cb99ff2
ILT
293in symbolic form. This is the default except when
294.B \-\-prefix\-addresses
295is used.
458bbd1f 296
5c59269f
ILT
297.TP
298.B \-\-no\-show\-raw\-insn
299When disassembling instructions, do not print the instruction bytes.
300This is the default when
301.B \-\-prefix\-addresses
302is used.
303
c5f0c938 304.TP
1f72cab1 305.B \-\-stabs
c3c93fda
JG
306Display the contents of the .stab, .stab.index, and .stab.excl
307sections from an ELF file. This is only useful on systems (such as
308Solaris 2.0) in which .stab debugging symbol-table entries are carried
309in an ELF section. In most other file formats, debugging symbol-table
310entries are interleaved with linkage symbols, and are visible in the
1f72cab1 311\-\-syms output.
c5f0c938 312
aa21a2a9
ILT
313.TP
314.BI "\-\-start\-address=" "address"
315Start displaying data at the specified address. This affects the output
316of the
317.B \-d\c
318,
319.B \-r
320and
321.B \-s
322options.
323
324.TP
325.BI "\-\-stop\-address=" "address"
326Stop displaying data at the specified address. This affects the output
327of the
328.B \-d\c
329,
330.B \-r
331and
332.B \-s
333options.
334
19450a0c
RP
335.TP
336.B \-t
337.TP
1f72cab1 338.B \-\-syms
19450a0c
RP
339Symbol Table. Print the symbol table entries of the file.
340This is similar to the information provided by the `\|\c
341.B nm\c
342\|' program.
343
de3b08ac
ILT
344.TP
345.B \-T
346.TP
347.B \-\-dynamic\-syms
348Dynamic Symbol Table. Print the dynamic symbol table entries of the
349file. This is only meaningful for dynamic objects, such as certain
350types of shared libraries. This is similar to the information
351provided by the `\|\c
352.B nm\c
353\|' program when given the
354.B \-D (\-\-dynamic)
355option.
356
b26ac613
DM
357.TP
358.B \-\-version
359Print the version number of
360.B objdump
361and exit.
362
19450a0c
RP
363.TP
364.B \-x
eae04238
DM
365.TP
366.B \-\-all\-headers
19450a0c
RP
367Display all available header information, including the symbol table and
368relocation entries. Using `\|\c
369.B \-x\c
370\|' is equivalent to specifying all of
371`\|\c
372.B \-a \-f \-h \-r \-t\c
373\|'.
374
19450a0c
RP
375.SH "SEE ALSO"
376.RB "`\|" binutils "\|'"
377entry in
378.B
379info\c
380\&;
381.I
382The GNU Binary Utilities\c
383\&, Roland H. Pesch (October 1991);
384.BR nm "(" 1 ")."
385
386.SH COPYING
1a418120 387Copyright (c) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
19450a0c
RP
388.PP
389Permission is granted to make and distribute verbatim copies of
390this manual provided the copyright notice and this permission notice
391are preserved on all copies.
392.PP
393Permission is granted to copy and distribute modified versions of this
394manual under the conditions for verbatim copying, provided that the
395entire resulting derived work is distributed under the terms of a
396permission notice identical to this one.
397.PP
398Permission is granted to copy and distribute translations of this
399manual into another language, under the above conditions for modified
400versions, except that this permission notice may be included in
401translations approved by the Free Software Foundation instead of in
402the original English.
This page took 0.259573 seconds and 4 git commands to generate.