aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.1
blob: ed4a629dd89d26192d8437fc67024dc1ef8f554f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
.\" Copyright (c) 1991, 1996, 1997 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.TH objdump 1 "5 November 1991" "cygnus support" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
\(**
..

.SH NAME
objdump \- display information from object files.

.SH SYNOPSIS
.hy 0
.na
.TP
.B objdump
.RB "[\|" \-a | \-\-archive\-headers "\|]" 
.RB "[\|" "\-b\ "\c
.I bfdname\c
.RB " | " "\-\-target="\c
.I bfdname\c
\&\|] 
.RB "[\|" \-C | \-\-demangle "\|]" 
.RB "[\|" \-\-debugging "\|]" 
.RB "[\|" \-d | \-\-disassemble "\|]" 
.RB "[\|" \-D | \-\-disassemble-all "\|]" 
.RB "[\|" \-\-disassemble\-zeroes "\|]" 
.RB "[\|" \-EB | \-EL | \-\-endian=\c
.I {big|little}\c
\&\|]
.RB "[\|" \-f | \-\-file\-headers "\|]"
.RB "[\|" \-h | \-\-section\-headers
.RB "| " \-\-headers "\|]" 
.RB "[\|" \-i | \-\-info "\|]" 
.RB "[\|" "\-j\ "\c
.I section\c
.RB " | " "\-\-section="\c
.I section\c
\&\|] 
.RB "[\|" \-l | \-\-line\-numbers "\|]"
.RB "[\|" "\-m\ "\c
.I machine\c
.RB " | " "\-\-architecture="\c
.I machine\c
\&\|] 
.RB "[\|" \-p | \-\-private\-headers "\|]" 
.RB "[\|" \-\-prefix\-addresses "\|]" 
.RB "[\|" \-r | \-\-reloc "\|]" 
.RB "[\|" \-R | \-\-dynamic\-reloc "\|]" 
.RB "[\|" \-s | \-\-full\-contents "\|]"
.RB "[\|" \-S | \-\-source "\|]"
.RB "[\|" \-\-[no\-]show\-raw\-insn "\|]" 
.RB "[\|" \-\-stabs "\|]"
.RB "[\|" \-t | \-\-syms "\|]" 
.RB "[\|" \-T | \-\-dynamic\-syms "\|]" 
.RB "[\|" \-x | \-\-all\-headers "\|]"
.RB "[\|" "\-\-start\-address="\c
.I address\c
\&\|]
.RB "[\|" "\-\-stop\-address="\c
.I address\c
\&\|]
.RB "[\|" "\-\-adjust\-vma="\c
.I offset\c
\&\|]
.RB "[\|" \-\-version "\|]"
.RB "[\|" \-\-help "\|]"
.I objfile\c
\&.\|.\|.
.ad b
.hy 1
.SH DESCRIPTION
\c
.B objdump\c
\& displays information about one or more object files.
The options control what particular information to display.  This
information is mostly useful to programmers who are working on the
compilation tools, as opposed to programmers who just want their
program to compile and work.
.PP
.IR  "objfile" .\|.\|.
are the object files to be examined.  When you specify archives,
\c
.B objdump\c
\& shows information on each of the member object files.

.SH OPTIONS
Where long and short forms of an option are shown together, they are
equivalent.  At least one option besides
.B \-l
(\fB\-\-line\-numbers\fP) must be given.

.TP
.B \-a
.TP
.B \-\-archive\-headers
If any files from \c
.I objfile\c
\& are archives, display the archive
header information (in a format similar to `\|\c
.B ls \-l\c
\|').  Besides the
information you could list with `\|\c
.B ar tv\c
\|', `\|\c
.B objdump \-a\c
\|' shows
the object file format of each archive member.

.TP
.BI "\-\-adjust\-vma=" "offset"
When dumping information, first add
.I offset
to all the section addresses.  This is useful if the section addresses
do not correspond to the symbol table, which can happen when putting
sections at particular addresses when using a format which can not
represent section addresses, such as a.out.

.TP
.BI "\-b " "bfdname"\c
.TP
.BI "\-\-target=" "bfdname"
Specify the object-code format for the object files to be
\c
.I bfdname\c
\&.  This may not be necessary; \c
.I objdump\c
\& can
automatically recognize many formats.  For example,
.sp
.br
objdump\ \-b\ oasys\ \-m\ vax\ \-h\ fu.o
.br
.sp
display summary information from the section headers (`\|\c
.B \-h\c
\|') of
`\|\c
.B fu.o\c
\|', which is explicitly identified (`\|\c
.B \-m\c
\|') as a Vax object
file in the format produced by Oasys compilers.  You can list the
formats available with the `\|\c
.B \-i\c
\|' option.

.TP
.B \-C
.TP
.B \-\-demangle
Decode (\fIdemangle\fP) low-level symbol names into user-level names.
Besides removing any initial underscore prepended by the system, this
makes C++ function names readable.

.TP
.B \-\-debugging
Display debugging information.  This attempts to parse debugging
information stored in the file and print it out using a C like syntax.
Only certain types of debugging information have been implemented.

.TP
.B \-d
.TP
.B \-\-disassemble
Display the assembler mnemonics for the machine
instructions from \c
.I objfile\c
\&.
This option only disassembles those sections which are
expected to contain instructions.

.TP
.B \-D
.TP
.B \-\-disassemble-all
Like \fB\-d\fP, but disassemble the contents of all sections, not just
those expected to contain instructions.

.TP
.B \-\-prefix\-addresses
When disassembling, print the complete address on each line.  This is
the older disassembly format.

.TP
.B \-\-disassemble\-zeroes
Normally the disassembly output will skip blocks of zeroes.  This
option directs the disassembler to disassemble those blocks, just like
any other data.

.TP
.B \-EB
.TP
.B \-EL
.TP
.BI "\-\-endian=" "{big|little}"
Specify the endianness of the object files.  This only affects
disassembly.  This can be useful when disassembling a file format which
does not describe endianness information, such as S-records.

.TP
.B \-f
.TP
.B \-\-file\-headers
Display summary information from the overall header of
each file in \c
.I objfile\c
\&.

.TP
.B \-h
.TP
.B \-\-section\-headers
.TP
.B \-\-headers
Display summary information from the section headers of the
object file.

.TP
.B \-\-help
Print a summary of the options to
.B objdump
and exit.

.TP
.B \-i
.TP
.B \-\-info
Display a list showing all architectures and object formats available
for specification with \c
.B \-b\c
\& or \c
.B \-m\c
\&.

.TP
.BI "\-j " "name"\c
.TP
.BI "\-\-section=" "name"
Display information only for section \c
.I name\c
\&.

.TP
.B \-l
.TP
.B \-\-line\-numbers
Label the display (using debugging information) with the filename
and source line numbers corresponding to the object code shown.
Only useful with \fB\-d\fP, \fB\-D\fP, or \fB\-r\fP.

.TP
.BI "\-m " "machine"\c
.TP
.BI "\-\-architecture=" "machine"
Specify the architecture to use when disassembling object files.  This
can be useful when disassembling object files which do not describe
architecture information, such as S-records.  You can list the available
architectures with the \fB\-i\fP option. 

.TP
.B \-p
.TP
.B \-\-private\-headers
Print information that is specific to the object file format.  The
exact information printed depends upon the object file format.  For
some object file formats, no additional information is printed.

.TP
.B \-r
.TP
.B \-\-reloc
Print the relocation entries of the file.  If used with \fB\-d\fP or
\fB\-d\fP, the relocations are printed interspersed with the
disassembly.

.TP
.B \-R
.TP
.B \-\-dynamic\-reloc
Print the dynamic relocation entries of the file.  This is only
meaningful for dynamic objects, such as certain types of shared
libraries.

.TP
.B \-s
.TP
.B \-\-full\-contents
Display the full contents of any sections requested.

.TP
.B \-S
.TP
.B \-\-source
Display source code intermixed with disassembly, if possible.  Implies
\fB-d\fP.

.TP
.B \-\-show\-raw\-insn
When disassembling instructions, print the instruction in hex as well as
in symbolic form.  This is the default except when
.B \-\-prefix\-addresses
is used.

.TP
.B \-\-no\-show\-raw\-insn
When disassembling instructions, do not print the instruction bytes.
This is the default when
.B \-\-prefix\-addresses
is used.

.TP
.B \-\-stabs
Display the contents of the .stab, .stab.index, and .stab.excl
sections from an ELF file.  This is only useful on systems (such as
Solaris 2.0) in which .stab debugging symbol-table entries are carried
in an ELF section.  In most other file formats, debugging symbol-table
entries are interleaved with linkage symbols, and are visible in the
\-\-syms output.

.TP
.BI "\-\-start\-address=" "address"
Start displaying data at the specified address.  This affects the output
of the
.B \-d\c
,
.B \-r
and
.B \-s
options.

.TP
.BI "\-\-stop\-address=" "address"
Stop displaying data at the specified address.  This affects the output
of the
.B \-d\c
,
.B \-r
and
.B \-s
options.

.TP
.B \-t
.TP
.B \-\-syms
Symbol Table.  Print the symbol table entries of the file.
This is similar to the information provided by the `\|\c
.B nm\c
\|' program.

.TP
.B \-T
.TP
.B \-\-dynamic\-syms
Dynamic Symbol Table.  Print the dynamic symbol table entries of the
file.  This is only meaningful for dynamic objects, such as certain
types of shared libraries.  This is similar to the information
provided by the `\|\c
.B nm\c
\|' program when given the
.B \-D (\-\-dynamic)
option.

.TP
.B \-\-version
Print the version number of
.B objdump
and exit.

.TP
.B \-x
.TP
.B \-\-all\-headers
Display all available header information, including the symbol table and
relocation entries.  Using `\|\c
.B \-x\c
\|' is equivalent to specifying all of
`\|\c
.B \-a \-f \-h \-r \-t\c
\|'.

.SH "SEE ALSO"
.RB "`\|" binutils "\|'"
entry in 
.B
info\c
\&; 
.I
The GNU Binary Utilities\c
\&, Roland H. Pesch (October 1991); 
.BR nm "(" 1 ")."

.SH COPYING
Copyright (c) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
.PP
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.