1OBJDUMP(1)                   GNU Development Tools                  OBJDUMP(1)
2
3
4

NAME

6       objdump - display information from object files.
7

SYNOPSIS

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               [-P options|--private=options]
30               [-r|--reloc]
31               [-R|--dynamic-reloc]
32               [-s|--full-contents]
33               [-W[lLiaprmfFsoRt]|
34                --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]]
35               [-G|--stabs]
36               [-t|--syms]
37               [-T|--dynamic-syms]
38               [-x|--all-headers]
39               [-w|--wide]
40               [--start-address=address]
41               [--stop-address=address]
42               [--prefix-addresses]
43               [--[no-]show-raw-insn]
44               [--adjust-vma=offset]
45               [--special-syms]
46               [--prefix=prefix]
47               [--prefix-strip=level]
48               [--insn-width=width]
49               [-V|--version]
50               [-H|--help]
51               objfile...
52

DESCRIPTION

54       objdump displays information about one or more object files.  The
55       options control what particular information to display.  This
56       information is mostly useful to programmers who are working on the
57       compilation tools, as opposed to programmers who just want their
58       program to compile and work.
59
60       objfile... are the object files to be examined.  When you specify
61       archives, objdump shows information on each of the member object files.
62

OPTIONS

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

SEE ALSO

546       nm(1), readelf(1), and the Info entries for binutils.
547
549       Copyright (c) 1991-2013 Free Software Foundation, Inc.
550
551       Permission is granted to copy, distribute and/or modify this document
552       under the terms of the GNU Free Documentation License, Version 1.3 or
553       any later version published by the Free Software Foundation; with no
554       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
555       Texts.  A copy of the license is included in the section entitled "GNU
556       Free Documentation License".
557
558
559
560binutils-2.24                     2019-07-25                        OBJDUMP(1)
Impressum