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 [--file-start-context]
18 [-g⎪--debugging]
19 [-e⎪--debugging-tags]
20 [-h⎪--section-headers⎪--headers]
21 [-i⎪--info]
22 [-j section⎪--section=section]
23 [-l⎪--line-numbers]
24 [-S⎪--source]
25 [-m machine⎪--architecture=machine]
26 [-M options⎪--disassembler-options=options]
27 [-p⎪--private-headers]
28 [-r⎪--reloc]
29 [-R⎪--dynamic-reloc]
30 [-s⎪--full-contents]
31 [-W⎪--dwarf]
32 [-G⎪--stabs]
33 [-t⎪--syms]
34 [-T⎪--dynamic-syms]
35 [-x⎪--all-headers]
36 [-w⎪--wide]
37 [--start-address=address]
38 [--stop-address=address]
39 [--prefix-addresses]
40 [--[no-]show-raw-insn]
41 [--adjust-vma=offset]
42 [--special-syms]
43 [-V⎪--version]
44 [-H⎪--help]
45 objfile...
46
48 objdump displays information about one or more object files. The
49 options control what particular information to display. This informa‐
50 tion is mostly useful to programmers who are working on the compilation
51 tools, as opposed to programmers who just want their program to compile
52 and work.
53
54 objfile... are the object files to be examined. When you specify ar‐
55 chives, objdump shows information on each of the member object files.
56
58 The long and short forms of options, shown here as alternatives, are
59 equivalent. At least one option from the list
60 -a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x must be given.
61
62 -a
63 --archive-header
64 If any of the objfile files are archives, display the archive
65 header information (in a format similar to ls -l). Besides the
66 information you could list with ar tv, objdump -a shows the object
67 file format of each archive member.
68
69 --adjust-vma=offset
70 When dumping information, first add offset to all the section
71 addresses. This is useful if the section addresses do not corre‐
72 spond to the symbol table, which can happen when putting sections
73 at particular addresses when using a format which can not represent
74 section addresses, such as a.out.
75
76 -b bfdname
77 --target=bfdname
78 Specify that the object-code format for the object files is bfd‐
79 name. This option may not be necessary; objdump can automatically
80 recognize many formats.
81
82 For example,
83
84 objdump -b oasys -m vax -h fu.o
85
86 displays summary information from the section headers (-h) of fu.o,
87 which is explicitly identified (-m) as a VAX object file in the
88 format produced by Oasys compilers. You can list the formats
89 available with the -i option.
90
91 -C
92 --demangle[=style]
93 Decode (demangle) low-level symbol names into user-level names.
94 Besides removing any initial underscore prepended by the system,
95 this makes C++ function names readable. Different compilers have
96 different mangling styles. The optional demangling style argument
97 can be used to choose an appropriate demangling style for your com‐
98 piler.
99
100 -g
101 --debugging
102 Display debugging information. This attempts to parse debugging
103 information stored in the file and print it out using a C like syn‐
104 tax. Only certain types of debugging information have been imple‐
105 mented. Some other types are supported by readelf -w.
106
107 -e
108 --debugging-tags
109 Like -g, but the information is generated in a format compatible
110 with ctags tool.
111
112 -d
113 --disassemble
114 Display the assembler mnemonics for the machine instructions from
115 objfile. This option only disassembles those sections which are
116 expected to contain instructions.
117
118 -D
119 --disassemble-all
120 Like -d, but disassemble the contents of all sections, not just
121 those expected to contain instructions.
122
123 --prefix-addresses
124 When disassembling, print the complete address on each line. This
125 is the older disassembly format.
126
127 -EB
128 -EL
129 --endian={big⎪little}
130 Specify the endianness of the object files. This only affects dis‐
131 assembly. This can be useful when disassembling a file format
132 which does not describe endianness information, such as S-records.
133
134 -f
135 --file-headers
136 Display summary information from the overall header of each of the
137 objfile files.
138
139 --file-start-context
140 Specify that when displaying interlisted source code/disassembly
141 (assumes -S) from a file that has not yet been displayed, extend
142 the context to the start of the file.
143
144 -h
145 --section-headers
146 --headers
147 Display summary information from the section headers of the object
148 file.
149
150 File segments may be relocated to nonstandard addresses, for exam‐
151 ple by using the -Ttext, -Tdata, or -Tbss options to ld. However,
152 some object file formats, such as a.out, do not store the starting
153 address of the file segments. In those situations, although ld
154 relocates the sections correctly, using objdump -h to list the file
155 section headers cannot show the correct addresses. Instead, it
156 shows the usual addresses, which are implicit for the target.
157
158 -H
159 --help
160 Print a summary of the options to objdump and exit.
161
162 -i
163 --info
164 Display a list showing all architectures and object formats avail‐
165 able for specification with -b or -m.
166
167 -j name
168 --section=name
169 Display information only for section name.
170
171 -l
172 --line-numbers
173 Label the display (using debugging information) with the filename
174 and source line numbers corresponding to the object code or relocs
175 shown. Only useful with -d, -D, or -r.
176
177 -m machine
178 --architecture=machine
179 Specify the architecture to use when disassembling object files.
180 This can be useful when disassembling object files which do not
181 describe architecture information, such as S-records. You can list
182 the available architectures with the -i option.
183
184 -M options
185 --disassembler-options=options
186 Pass target specific information to the disassembler. Only sup‐
187 ported on some targets. If it is necessary to specify more than
188 one disassembler option then multiple -M options can be used or can
189 be placed together into a comma separated list.
190
191 If the target is an ARM architecture then this switch can be used
192 to select which register name set is used during disassembler.
193 Specifying -M reg-names-std (the default) will select the register
194 names as used in ARM's instruction set documentation, but with reg‐
195 ister 13 called 'sp', register 14 called 'lr' and register 15
196 called 'pc'. Specifying -M reg-names-apcs will select the name set
197 used by the ARM Procedure Call Standard, whilst specifying -M reg-
198 names-raw will just use r followed by the register number.
199
200 There are also two variants on the APCS register naming scheme
201 enabled by -M reg-names-atpcs and -M reg-names-special-atpcs which
202 use the ARM/Thumb Procedure Call Standard naming conventions.
203 (Either with the normal register names or the special register
204 names).
205
206 This option can also be used for ARM architectures to force the
207 disassembler to interpret all instructions as Thumb instructions by
208 using the switch --disassembler-options=force-thumb. This can be
209 useful when attempting to disassemble thumb code produced by other
210 compilers.
211
212 For the x86, some of the options duplicate functions of the -m
213 switch, but allow finer grained control. Multiple selections from
214 the following may be specified as a comma separated string.
215 x86-64, i386 and i8086 select disassembly for the given architec‐
216 ture. intel and att select between intel syntax mode and AT&T syn‐
217 tax mode. addr32, addr16, data32 and data16 specify the default
218 address size and operand size. These four options will be overrid‐
219 den if x86-64, i386 or i8086 appear later in the option string.
220 Lastly, suffix, when in AT&T mode, instructs the disassembler to
221 print a mnemonic suffix even when the suffix could be inferred by
222 the operands.
223
224 For PPC, booke, booke32 and booke64 select disassembly of BookE
225 instructions. 32 and 64 select PowerPC and PowerPC64 disassembly,
226 respectively. e300 selects disassembly for the e300 family.
227
228 For MIPS, this option controls the printing of instruction mnemonic
229 names and register names in disassembled instructions. Multiple
230 selections from the following may be specified as a comma separated
231 string, and invalid options are ignored:
232
233 "no-aliases"
234 Print the 'raw' instruction mnemonic instead of some pseudo
235 instruction mnemonic. I.e., print 'daddu' or 'or' instead of
236 'move', 'sll' instead of 'nop', etc.
237
238 "gpr-names=ABI"
239 Print GPR (general-purpose register) names as appropriate for
240 the specified ABI. By default, GPR names are selected accord‐
241 ing to the ABI of the binary being disassembled.
242
243 "fpr-names=ABI"
244 Print FPR (floating-point register) names as appropriate for
245 the specified ABI. By default, FPR numbers are printed rather
246 than names.
247
248 "cp0-names=ARCH"
249 Print CP0 (system control coprocessor; coprocessor 0) register
250 names as appropriate for the CPU or architecture specified by
251 ARCH. By default, CP0 register names are selected according to
252 the architecture and CPU of the binary being disassembled.
253
254 "hwr-names=ARCH"
255 Print HWR (hardware register, used by the "rdhwr" instruction)
256 names as appropriate for the CPU or architecture specified by
257 ARCH. By default, HWR names are selected according to the
258 architecture and CPU of the binary being disassembled.
259
260 "reg-names=ABI"
261 Print GPR and FPR names as appropriate for the selected ABI.
262
263 "reg-names=ARCH"
264 Print CPU-specific register names (CP0 register and HWR names)
265 as appropriate for the selected CPU or architecture.
266
267 For any of the options listed above, ABI or ARCH may be specified
268 as numeric to have numbers printed rather than names, for the
269 selected types of registers. You can list the available values of
270 ABI and ARCH using the --help option.
271
272 For VAX, you can specify function entry addresses with -M
273 entry:0xf00ba. You can use this multiple times to properly disas‐
274 semble VAX binary files that don't contain symbol tables (like ROM
275 dumps). In these cases, the function entry mask would otherwise be
276 decoded as VAX instructions, which would probably lead the rest of
277 the function being wrongly disassembled.
278
279 -p
280 --private-headers
281 Print information that is specific to the object file format. The
282 exact information printed depends upon the object file format. For
283 some object file formats, no additional information is printed.
284
285 -r
286 --reloc
287 Print the relocation entries of the file. If used with -d or -D,
288 the relocations are printed interspersed with the disassembly.
289
290 -R
291 --dynamic-reloc
292 Print the dynamic relocation entries of the file. This is only
293 meaningful for dynamic objects, such as certain types of shared
294 libraries.
295
296 -s
297 --full-contents
298 Display the full contents of any sections requested. By default
299 all non-empty sections are displayed.
300
301 -S
302 --source
303 Display source code intermixed with disassembly, if possible.
304 Implies -d.
305
306 --show-raw-insn
307 When disassembling instructions, print the instruction in hex as
308 well as in symbolic form. This is the default except when --pre‐
309 fix-addresses is used.
310
311 --no-show-raw-insn
312 When disassembling instructions, do not print the instruction
313 bytes. This is the default when --prefix-addresses is used.
314
315 -W
316 --dwarf
317 Displays the contents of the DWARF debug sections in the file, if
318 any are present.
319
320 -G
321 --stabs
322 Display the full contents of any sections requested. Display the
323 contents of the .stab and .stab.index and .stab.excl sections from
324 an ELF file. This is only useful on systems (such as Solaris 2.0)
325 in which ".stab" debugging symbol-table entries are carried in an
326 ELF section. In most other file formats, debugging symbol-table
327 entries are interleaved with linkage symbols, and are visible in
328 the --syms output.
329
330 --start-address=address
331 Start displaying data at the specified address. This affects the
332 output of the -d, -r and -s options.
333
334 --stop-address=address
335 Stop displaying data at the specified address. This affects the
336 output of the -d, -r and -s options.
337
338 -t
339 --syms
340 Print the symbol table entries of the file. This is similar to the
341 information provided by the nm program.
342
343 -T
344 --dynamic-syms
345 Print the dynamic symbol table entries of the file. This is only
346 meaningful for dynamic objects, such as certain types of shared
347 libraries. This is similar to the information provided by the nm
348 program when given the -D (--dynamic) option.
349
350 --special-syms
351 When displaying symbols include those which the target considers to
352 be special in some way and which would not normally be of interest
353 to the user.
354
355 -V
356 --version
357 Print the version number of objdump and exit.
358
359 -x
360 --all-headers
361 Display all available header information, including the symbol ta‐
362 ble and relocation entries. Using -x is equivalent to specifying
363 all of -a -f -h -p -r -t.
364
365 -w
366 --wide
367 Format some lines for output devices that have more than 80 col‐
368 umns. Also do not truncate symbol names when they are displayed.
369
370 -z
371 --disassemble-zeroes
372 Normally the disassembly output will skip blocks of zeroes. This
373 option directs the disassembler to disassemble those blocks, just
374 like any other data.
375
376 @file
377 Read command-line options from file. The options read are inserted
378 in place of the original @file option. If file does not exist, or
379 cannot be read, then the option will be treated literally, and not
380 removed.
381
382 Options in file are separated by whitespace. A whitespace charac‐
383 ter may be included in an option by surrounding the entire option
384 in either single or double quotes. Any character (including a
385 backslash) may be included by prefixing the character to be
386 included with a backslash. The file may itself contain additional
387 @file options; any such options will be processed recursively.
388
390 nm(1), readelf(1), and the Info entries for binutils.
391
393 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
394 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
395
396 Permission is granted to copy, distribute and/or modify this document
397 under the terms of the GNU Free Documentation License, Version 1.1 or
398 any later version published by the Free Software Foundation; with no
399 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
400 Texts. A copy of the license is included in the section entitled "GNU
401 Free Documentation License".
402
403
404
405binutils-2.17.50.0.12-4 2007-04-14 OBJDUMP(1)