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