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