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