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