1OBJDUMP(1) GNU Development Tools OBJDUMP(1)
2
3
4
6 objdump - display information from object files.
7
9 objdump [-a|--archive-headers]
10 [-b bfdname|--target=bfdname]
11 [-C|--demangle[=style] ]
12 [-d|--disassemble]
13 [-D|--disassemble-all]
14 [-z|--disassemble-zeroes]
15 [-EB|-EL|--endian={big | little }]
16 [-f|--file-headers]
17 [-F|--file-offsets]
18 [--file-start-context]
19 [-g|--debugging]
20 [-e|--debugging-tags]
21 [-h|--section-headers|--headers]
22 [-i|--info]
23 [-j section|--section=section]
24 [-l|--line-numbers]
25 [-S|--source]
26 [-m machine|--architecture=machine]
27 [-M options|--disassembler-options=options]
28 [-p|--private-headers]
29 [-r|--reloc]
30 [-R|--dynamic-reloc]
31 [-s|--full-contents]
32 [-W|--dwarf]
33 [-G|--stabs]
34 [-t|--syms]
35 [-T|--dynamic-syms]
36 [-x|--all-headers]
37 [-w|--wide]
38 [--start-address=address]
39 [--stop-address=address]
40 [--prefix-addresses]
41 [--[no-]show-raw-insn]
42 [--adjust-vma=offset]
43 [--special-syms]
44 [-V|--version]
45 [-H|--help]
46 objfile...
47
49 objdump displays information about one or more object files. The
50 options control what particular information to display. This
51 information is mostly useful to programmers who are working on the
52 compilation tools, as opposed to programmers who just want their
53 program to compile and work.
54
55 objfile... are the object files to be examined. When you specify
56 archives, objdump shows information on each of the member object files.
57
59 The long and short forms of options, shown here as alternatives, are
60 equivalent. At least one option from the list
61 -a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x must be given.
62
63 -a
64 --archive-header
65 If any of the objfile files are archives, display the archive
66 header information (in a format similar to ls -l). Besides the
67 information you could list with ar tv, objdump -a shows the object
68 file format of each archive member.
69
70 --adjust-vma=offset
71 When dumping information, first add offset to all the section
72 addresses. This is useful if the section addresses do not
73 correspond to the symbol table, which can happen when putting
74 sections at particular addresses when using a format which can not
75 represent section addresses, such as a.out.
76
77 -b bfdname
78 --target=bfdname
79 Specify that the object-code format for the object files is
80 bfdname. This option may not be necessary; objdump can
81 automatically recognize many formats.
82
83 For example,
84
85 objdump -b oasys -m vax -h fu.o
86
87 displays summary information from the section headers (-h) of fu.o,
88 which is explicitly identified (-m) as a VAX object file in the
89 format produced by Oasys compilers. You can list the formats
90 available with the -i option.
91
92 -C
93 --demangle[=style]
94 Decode (demangle) low-level symbol names into user-level names.
95 Besides removing any initial underscore prepended by the system,
96 this makes C++ function names readable. Different compilers have
97 different mangling styles. The optional demangling style argument
98 can be used to choose an appropriate demangling style for your
99 compiler.
100
101 -g
102 --debugging
103 Display debugging information. This attempts to parse STABS and
104 IEEE debugging format information stored in the file and print it
105 out using a C like syntax. If neither of these formats are found
106 this option falls back on the -W option to print any DWARF
107 information in the file.
108
109 -e
110 --debugging-tags
111 Like -g, but the information is generated in a format compatible
112 with ctags tool.
113
114 -d
115 --disassemble
116 Display the assembler mnemonics for the machine instructions from
117 objfile. This option only disassembles those sections which are
118 expected to contain instructions.
119
120 -D
121 --disassemble-all
122 Like -d, but disassemble the contents of all sections, not just
123 those expected to contain instructions.
124
125 --prefix-addresses
126 When disassembling, print the complete address on each line. This
127 is the older disassembly format.
128
129 -EB
130 -EL
131 --endian={big|little}
132 Specify the endianness of the object files. This only affects
133 disassembly. This can be useful when disassembling a file format
134 which does not describe endianness information, such as S-records.
135
136 -f
137 --file-headers
138 Display summary information from the overall header of each of the
139 objfile files.
140
141 -F
142 --file-offsets
143 When disassembling sections, whenever a symbol is displayed, also
144 display the file offset of the region of data that is about to be
145 dumped. If zeroes are being skipped, then when disassembly
146 resumes, tell the user how many zeroes were skipped and the file
147 offset of the location from where the disassembly resumes. When
148 dumping sections, display the file offset of the location from
149 where the dump starts.
150
151 --file-start-context
152 Specify that when displaying interlisted source code/disassembly
153 (assumes -S) from a file that has not yet been displayed, extend
154 the context to the start of the file.
155
156 -h
157 --section-headers
158 --headers
159 Display summary information from the section headers of the object
160 file.
161
162 File segments may be relocated to nonstandard addresses, for
163 example by using the -Ttext, -Tdata, or -Tbss options to ld.
164 However, some object file formats, such as a.out, do not store the
165 starting address of the file segments. In those situations,
166 although ld relocates the sections correctly, using objdump -h to
167 list the file section headers cannot show the correct addresses.
168 Instead, it shows the usual addresses, which are implicit for the
169 target.
170
171 -H
172 --help
173 Print a summary of the options to objdump and exit.
174
175 -i
176 --info
177 Display a list showing all architectures and object formats
178 available for specification with -b or -m.
179
180 -j name
181 --section=name
182 Display information only for section name.
183
184 -l
185 --line-numbers
186 Label the display (using debugging information) with the filename
187 and source line numbers corresponding to the object code or relocs
188 shown. Only useful with -d, -D, or -r.
189
190 -m machine
191 --architecture=machine
192 Specify the architecture to use when disassembling object files.
193 This can be useful when disassembling object files which do not
194 describe architecture information, such as S-records. You can list
195 the available architectures with the -i option.
196
197 -M options
198 --disassembler-options=options
199 Pass target specific information to the disassembler. Only
200 supported on some targets. If it is necessary to specify more than
201 one disassembler option then multiple -M options can be used or can
202 be placed together into a comma separated list.
203
204 If the target is an ARM architecture then this switch can be used
205 to select which register name set is used during disassembler.
206 Specifying -M reg-names-std (the default) will select the register
207 names as used in ARM's instruction set documentation, but with
208 register 13 called 'sp', register 14 called 'lr' and register 15
209 called 'pc'. Specifying -M reg-names-apcs will select the name set
210 used by the ARM Procedure Call Standard, whilst specifying -M reg-
211 names-raw will just use r followed by the register number.
212
213 There are also two variants on the APCS register naming scheme
214 enabled by -M reg-names-atpcs and -M reg-names-special-atpcs which
215 use the ARM/Thumb Procedure Call Standard naming conventions.
216 (Either with the normal register names or the special register
217 names).
218
219 This option can also be used for ARM architectures to force the
220 disassembler to interpret all instructions as Thumb instructions by
221 using the switch --disassembler-options=force-thumb. This can be
222 useful when attempting to disassemble thumb code produced by other
223 compilers.
224
225 For the x86, some of the options duplicate functions of the -m
226 switch, but allow finer grained control. Multiple selections from
227 the following may be specified as a comma separated string.
228 x86-64, i386 and i8086 select disassembly for the given
229 architecture. intel and att select between intel syntax mode and
230 AT&T syntax mode. intel-mnemonic and att-mnemonic select between
231 intel mnemonic mode and AT&T mnemonic mode. intel-mnemonic implies
232 intel and att-mnemonic implies att. addr64, addr32, addr16, data32
233 and data16 specify the default address size and operand size.
234 These four options will be overridden if x86-64, i386 or i8086
235 appear later in the option string. Lastly, suffix, when in AT&T
236 mode, instructs the disassembler to print a mnemonic suffix even
237 when the suffix could be inferred by the operands.
238
239 For PPC, booke, booke32 and booke64 select disassembly of BookE
240 instructions. 32 and 64 select PowerPC and PowerPC64 disassembly,
241 respectively. e300 selects disassembly for the e300 family. 440
242 selects disassembly for the PowerPC 440. ppcps selects disassembly
243 for the paired single instructions of the PPC750CL.
244
245 For MIPS, this option controls the printing of instruction mnemonic
246 names and register names in disassembled instructions. Multiple
247 selections from the following may be specified as a comma separated
248 string, and invalid options are ignored:
249
250 "no-aliases"
251 Print the 'raw' instruction mnemonic instead of some pseudo
252 instruction mnemonic. I.e., print 'daddu' or 'or' instead of
253 'move', 'sll' instead of 'nop', etc.
254
255 "gpr-names=ABI"
256 Print GPR (general-purpose register) names as appropriate for
257 the specified ABI. By default, GPR names are selected
258 according to the ABI of the binary being disassembled.
259
260 "fpr-names=ABI"
261 Print FPR (floating-point register) names as appropriate for
262 the specified ABI. By default, FPR numbers are printed rather
263 than names.
264
265 "cp0-names=ARCH"
266 Print CP0 (system control coprocessor; coprocessor 0) register
267 names as appropriate for the CPU or architecture specified by
268 ARCH. By default, CP0 register names are selected according to
269 the architecture and CPU of the binary being disassembled.
270
271 "hwr-names=ARCH"
272 Print HWR (hardware register, used by the "rdhwr" instruction)
273 names as appropriate for the CPU or architecture specified by
274 ARCH. By default, HWR names are selected according to the
275 architecture and CPU of the binary being disassembled.
276
277 "reg-names=ABI"
278 Print GPR and FPR names as appropriate for the selected ABI.
279
280 "reg-names=ARCH"
281 Print CPU-specific register names (CP0 register and HWR names)
282 as appropriate for the selected CPU or architecture.
283
284 For any of the options listed above, ABI or ARCH may be specified
285 as numeric to have numbers printed rather than names, for the
286 selected types of registers. You can list the available values of
287 ABI and ARCH using the --help option.
288
289 For VAX, you can specify function entry addresses with -M
290 entry:0xf00ba. You can use this multiple times to properly
291 disassemble VAX binary files that don't contain symbol tables (like
292 ROM dumps). In these cases, the function entry mask would
293 otherwise be decoded as VAX instructions, which would probably lead
294 the rest of the function being wrongly disassembled.
295
296 -p
297 --private-headers
298 Print information that is specific to the object file format. The
299 exact information printed depends upon the object file format. For
300 some object file formats, no additional information is printed.
301
302 -r
303 --reloc
304 Print the relocation entries of the file. If used with -d or -D,
305 the relocations are printed interspersed with the disassembly.
306
307 -R
308 --dynamic-reloc
309 Print the dynamic relocation entries of the file. This is only
310 meaningful for dynamic objects, such as certain types of shared
311 libraries.
312
313 -s
314 --full-contents
315 Display the full contents of any sections requested. By default
316 all non-empty sections are displayed.
317
318 -S
319 --source
320 Display source code intermixed with disassembly, if possible.
321 Implies -d.
322
323 --show-raw-insn
324 When disassembling instructions, print the instruction in hex as
325 well as in symbolic form. This is the default except when
326 --prefix-addresses is used.
327
328 --no-show-raw-insn
329 When disassembling instructions, do not print the instruction
330 bytes. This is the default when --prefix-addresses is used.
331
332 -W
333 --dwarf
334 Displays the contents of the DWARF debug sections in the file, if
335 any are present.
336
337 -G
338 --stabs
339 Display the full contents of any sections requested. Display the
340 contents of the .stab and .stab.index and .stab.excl sections from
341 an ELF file. This is only useful on systems (such as Solaris 2.0)
342 in which ".stab" debugging symbol-table entries are carried in an
343 ELF section. In most other file formats, debugging symbol-table
344 entries are interleaved with linkage symbols, and are visible in
345 the --syms output.
346
347 --start-address=address
348 Start displaying data at the specified address. This affects the
349 output of the -d, -r and -s options.
350
351 --stop-address=address
352 Stop displaying data at the specified address. This affects the
353 output of the -d, -r and -s options.
354
355 -t
356 --syms
357 Print the symbol table entries of the file. This is similar to the
358 information provided by the nm program, although the display format
359 is different. The format of the output depends upon the format of
360 the file being dumped, but there are two main types. One looks
361 like this:
362
363 [ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss
364 [ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred
365
366 where the number inside the square brackets is the number of the
367 entry in the symbol table, the sec number is the section number,
368 the fl value are the symbol's flag bits, the ty number is the
369 symbol's type, the scl number is the symbol's storage class and the
370 nx value is the number of auxilary entries associated with the
371 symbol. The last two fields are the symbol's value and its name.
372
373 The other common output format, usually seen with ELF based files,
374 looks like this:
375
376 00000000 l d .bss 00000000 .bss
377 00000000 g .text 00000000 fred
378
379 Here the first number is the symbol's value (sometimes refered to
380 as its address). The next field is actually a set of characters
381 and spaces indicating the flag bits that are set on the symbol.
382 These characters are described below. Next is the section with
383 which the symbol is associated or *ABS* if the section is absolute
384 (ie not connected with any section), or *UND* if the section is
385 referenced in the file being dumped, but not defined there.
386
387 After the section name comes another field, a number, which for
388 common symbols is the alignment and for other symbol is the size.
389 Finally the symbol's name is displayed.
390
391 The flag characters are divided into 7 groups as follows:
392
393 "l"
394 "g"
395 "!" The symbol is local (l), global (g), neither (a space) or both
396 (!). A symbol can be neither local or global for a variety of
397 reasons, e.g., because it is used for debugging, but it is
398 probably an indication of a bug if it is ever both local and
399 global.
400
401 "w" The symbol is weak (w) or strong (a space).
402
403 "C" The symbol denotes a constructor (C) or an ordinary symbol (a
404 space).
405
406 "W" The symbol is a warning (W) or a normal symbol (a space). A
407 warning symbol's name is a message to be displayed if the
408 symbol following the warning symbol is ever referenced.
409
410 "I" The symbol is an indirect reference to another symbol (I) or a
411 normal symbol (a space).
412
413 "d"
414 "D" The symbol is a debugging symbol (d) or a dynamic symbol (D) or
415 a normal symbol (a space).
416
417 "F"
418 "f"
419 "O" The symbol is the name of a function (F) or a file (f) or an
420 object (O) or just a normal symbol (a space).
421
422 -T
423 --dynamic-syms
424 Print the dynamic symbol table entries of the file. This is only
425 meaningful for dynamic objects, such as certain types of shared
426 libraries. This is similar to the information provided by the nm
427 program when given the -D (--dynamic) option.
428
429 --special-syms
430 When displaying symbols include those which the target considers to
431 be special in some way and which would not normally be of interest
432 to the user.
433
434 -V
435 --version
436 Print the version number of objdump and exit.
437
438 -x
439 --all-headers
440 Display all available header information, including the symbol
441 table and relocation entries. Using -x is equivalent to specifying
442 all of -a -f -h -p -r -t.
443
444 -w
445 --wide
446 Format some lines for output devices that have more than 80
447 columns. Also do not truncate symbol names when they are
448 displayed.
449
450 -z
451 --disassemble-zeroes
452 Normally the disassembly output will skip blocks of zeroes. This
453 option directs the disassembler to disassemble those blocks, just
454 like any other data.
455
456 @file
457 Read command-line options from file. The options read are inserted
458 in place of the original @file option. If file does not exist, or
459 cannot be read, then the option will be treated literally, and not
460 removed.
461
462 Options in file are separated by whitespace. A whitespace
463 character may be included in an option by surrounding the entire
464 option in either single or double quotes. Any character (including
465 a backslash) may be included by prefixing the character to be
466 included with a backslash. The file may itself contain additional
467 @file options; any such options will be processed recursively.
468
470 nm(1), readelf(1), and the Info entries for binutils.
471
473 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
474 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
475 Foundation, Inc.
476
477 Permission is granted to copy, distribute and/or modify this document
478 under the terms of the GNU Free Documentation License, Version 1.2 or
479 any later version published by the Free Software Foundation; with no
480 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
481 Texts. A copy of the license is included in the section entitled "GNU
482 Free Documentation License".
483
484
485
486binutils-2.19.50.0.1 2009-07-28 OBJDUMP(1)