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]
35                        [=aranges,=macro,=frames,=frames-interp,=str,=loc]
36                        [=Ranges,=pubtypes,=trace_info,=trace_abbrev]
37                        [=trace_aranges,=gdb_index]
38               [-G|--stabs]
39               [-t|--syms]
40               [-T|--dynamic-syms]
41               [-x|--all-headers]
42               [-w|--wide]
43               [--start-address=address]
44               [--stop-address=address]
45               [--prefix-addresses]
46               [--[no-]show-raw-insn]
47               [--adjust-vma=offset]
48               [--dwarf-depth=n]
49               [--dwarf-start=n]
50               [--special-syms]
51               [--prefix=prefix]
52               [--prefix-strip=level]
53               [--insn-width=width]
54               [-V|--version]
55               [-H|--help]
56               objfile...
57

DESCRIPTION

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

OPTIONS

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

SEE ALSO

613       nm(1), readelf(1), and the Info entries for binutils.
614
616       Copyright (c) 1991-2016 Free Software Foundation, Inc.
617
618       Permission is granted to copy, distribute and/or modify this document
619       under the terms of the GNU Free Documentation License, Version 1.3 or
620       any later version published by the Free Software Foundation; with no
621       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
622       Texts.  A copy of the license is included in the section entitled "GNU
623       Free Documentation License".
624
625
626
627binutils-2.27                     2016-08-03                        OBJDUMP(1)
Impressum