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