| <html lang="en"> | |
| <head> | |
| <title>objdump - GNU Binary Utilities</title> | |
| <meta http-equiv="Content-Type" content="text/html"> | |
| <meta name="description" content="GNU Binary Utilities"> | |
| <meta name="generator" content="makeinfo 4.13"> | |
| <link title="Top" rel="start" href="index.html#Top"> | |
| <link rel="prev" href="objcopy.html#objcopy" title="objcopy"> | |
| <link rel="next" href="ranlib.html#ranlib" title="ranlib"> | |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> | |
| <!-- | |
| Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, | |
| 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, | |
| 2010, 2011, 2012, 2013 | |
| Free Software Foundation, Inc. | |
| Permission is granted to copy, distribute and/or modify this document | |
| under the terms of the GNU Free Documentation License, Version 1.3 | |
| or any later version published by the Free Software Foundation; | |
| with no Invariant Sections, with no Front-Cover Texts, and with no | |
| Back-Cover Texts. A copy of the license is included in the | |
| section entitled ``GNU Free Documentation License''. | |
| --> | |
| <meta http-equiv="Content-Style-Type" content="text/css"> | |
| <style type="text/css"><!-- | |
| pre.display { font-family:inherit } | |
| pre.format { font-family:inherit } | |
| pre.smalldisplay { font-family:inherit; font-size:smaller } | |
| pre.smallformat { font-family:inherit; font-size:smaller } | |
| pre.smallexample { font-size:smaller } | |
| pre.smalllisp { font-size:smaller } | |
| span.sc { font-variant:small-caps } | |
| span.roman { font-family:serif; font-weight:normal; } | |
| span.sansserif { font-family:sans-serif; font-weight:normal; } | |
| --></style> | |
| </head> | |
| <body> | |
| <div class="node"> | |
| <a name="objdump"></a> | |
| <p> | |
| Next: <a rel="next" accesskey="n" href="ranlib.html#ranlib">ranlib</a>, | |
| Previous: <a rel="previous" accesskey="p" href="objcopy.html#objcopy">objcopy</a>, | |
| Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> | |
| <hr> | |
| </div> | |
| <h2 class="chapter">4 objdump</h2> | |
| <p><a name="index-object-file-information-67"></a><a name="index-objdump-68"></a> | |
| <!-- man title objdump display information from object files. --> | |
| <pre class="smallexample"> <!-- man begin SYNOPSIS objdump --> | |
| objdump [<samp><span class="option">-a</span></samp>|<samp><span class="option">--archive-headers</span></samp>] | |
| [<samp><span class="option">-b</span></samp> <var>bfdname</var>|<samp><span class="option">--target=</span><var>bfdname</var></samp>] | |
| [<samp><span class="option">-C</span></samp>|<samp><span class="option">--demangle</span></samp>[=<var>style</var>] ] | |
| [<samp><span class="option">-d</span></samp>|<samp><span class="option">--disassemble</span></samp>] | |
| [<samp><span class="option">-D</span></samp>|<samp><span class="option">--disassemble-all</span></samp>] | |
| [<samp><span class="option">-z</span></samp>|<samp><span class="option">--disassemble-zeroes</span></samp>] | |
| [<samp><span class="option">-EB</span></samp>|<samp><span class="option">-EL</span></samp>|<samp><span class="option">--endian=</span></samp>{big | little }] | |
| [<samp><span class="option">-f</span></samp>|<samp><span class="option">--file-headers</span></samp>] | |
| [<samp><span class="option">-F</span></samp>|<samp><span class="option">--file-offsets</span></samp>] | |
| [<samp><span class="option">--file-start-context</span></samp>] | |
| [<samp><span class="option">-g</span></samp>|<samp><span class="option">--debugging</span></samp>] | |
| [<samp><span class="option">-e</span></samp>|<samp><span class="option">--debugging-tags</span></samp>] | |
| [<samp><span class="option">-h</span></samp>|<samp><span class="option">--section-headers</span></samp>|<samp><span class="option">--headers</span></samp>] | |
| [<samp><span class="option">-i</span></samp>|<samp><span class="option">--info</span></samp>] | |
| [<samp><span class="option">-j</span></samp> <var>section</var>|<samp><span class="option">--section=</span></samp><var>section</var>] | |
| [<samp><span class="option">-l</span></samp>|<samp><span class="option">--line-numbers</span></samp>] | |
| [<samp><span class="option">-S</span></samp>|<samp><span class="option">--source</span></samp>] | |
| [<samp><span class="option">-m</span></samp> <var>machine</var>|<samp><span class="option">--architecture=</span></samp><var>machine</var>] | |
| [<samp><span class="option">-M</span></samp> <var>options</var>|<samp><span class="option">--disassembler-options=</span></samp><var>options</var>] | |
| [<samp><span class="option">-p</span></samp>|<samp><span class="option">--private-headers</span></samp>] | |
| [<samp><span class="option">-P</span></samp> <var>options</var>|<samp><span class="option">--private=</span></samp><var>options</var>] | |
| [<samp><span class="option">-r</span></samp>|<samp><span class="option">--reloc</span></samp>] | |
| [<samp><span class="option">-R</span></samp>|<samp><span class="option">--dynamic-reloc</span></samp>] | |
| [<samp><span class="option">-s</span></samp>|<samp><span class="option">--full-contents</span></samp>] | |
| [<samp><span class="option">-W[lLiaprmfFsoRt]</span></samp>| | |
| <samp><span class="option">--dwarf</span></samp>[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]] | |
| [<samp><span class="option">-G</span></samp>|<samp><span class="option">--stabs</span></samp>] | |
| [<samp><span class="option">-t</span></samp>|<samp><span class="option">--syms</span></samp>] | |
| [<samp><span class="option">-T</span></samp>|<samp><span class="option">--dynamic-syms</span></samp>] | |
| [<samp><span class="option">-x</span></samp>|<samp><span class="option">--all-headers</span></samp>] | |
| [<samp><span class="option">-w</span></samp>|<samp><span class="option">--wide</span></samp>] | |
| [<samp><span class="option">--start-address=</span></samp><var>address</var>] | |
| [<samp><span class="option">--stop-address=</span></samp><var>address</var>] | |
| [<samp><span class="option">--prefix-addresses</span></samp>] | |
| [<samp><span class="option">--[no-]show-raw-insn</span></samp>] | |
| [<samp><span class="option">--adjust-vma=</span></samp><var>offset</var>] | |
| [<samp><span class="option">--special-syms</span></samp>] | |
| [<samp><span class="option">--prefix=</span></samp><var>prefix</var>] | |
| [<samp><span class="option">--prefix-strip=</span></samp><var>level</var>] | |
| [<samp><span class="option">--insn-width=</span></samp><var>width</var>] | |
| [<samp><span class="option">-V</span></samp>|<samp><span class="option">--version</span></samp>] | |
| [<samp><span class="option">-H</span></samp>|<samp><span class="option">--help</span></samp>] | |
| <var>objfile</var>... | |
| <!-- man end --> | |
| </pre> | |
| <!-- man begin DESCRIPTION objdump --> | |
| <p><samp><span class="command">objdump</span></samp> displays information about one or more object files. | |
| The options control what particular information to display. This | |
| information is mostly useful to programmers who are working on the | |
| compilation tools, as opposed to programmers who just want their | |
| program to compile and work. | |
| <p><var>objfile</var><small class="dots">...</small> are the object files to be examined. When you | |
| specify archives, <samp><span class="command">objdump</span></samp> shows information on each of the member | |
| object files. | |
| <!-- man end --> | |
| <!-- man begin OPTIONS objdump --> | |
| <p>The long and short forms of options, shown here as alternatives, are | |
| equivalent. At least one option from the list | |
| <samp><span class="option">-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-P,-r,-R,-s,-S,-t,-T,-V,-x</span></samp> must be given. | |
| <dl> | |
| <dt><samp><span class="env">-a</span></samp><dt><samp><span class="env">--archive-header</span></samp><dd><a name="index-archive-headers-69"></a>If any of the <var>objfile</var> files are archives, display the archive | |
| header information (in a format similar to ‘<samp><span class="samp">ls -l</span></samp>’). Besides the | |
| information you could list with ‘<samp><span class="samp">ar tv</span></samp>’, ‘<samp><span class="samp">objdump -a</span></samp>’ shows | |
| the object file format of each archive member. | |
| <br><dt><samp><span class="env">--adjust-vma=</span><var>offset</var></samp><dd><a name="index-section-addresses-in-objdump-70"></a><a name="index-VMA-in-objdump-71"></a>When dumping information, first add <var>offset</var> to all the section | |
| addresses. This is useful if the section addresses do not correspond to | |
| the symbol table, which can happen when putting sections at particular | |
| addresses when using a format which can not represent section addresses, | |
| such as a.out. | |
| <br><dt><samp><span class="env">-b </span><var>bfdname</var></samp><dt><samp><span class="env">--target=</span><var>bfdname</var></samp><dd><a name="index-object-code-format-72"></a>Specify that the object-code format for the object files is | |
| <var>bfdname</var>. This option may not be necessary; <var>objdump</var> can | |
| automatically recognize many formats. | |
| <p>For example, | |
| <pre class="example"> objdump -b oasys -m vax -h fu.o | |
| </pre> | |
| <p class="noindent">displays summary information from the section headers (<samp><span class="option">-h</span></samp>) of | |
| <samp><span class="file">fu.o</span></samp>, which is explicitly identified (<samp><span class="option">-m</span></samp>) as a VAX object | |
| file in the format produced by Oasys compilers. You can list the | |
| formats available with the <samp><span class="option">-i</span></samp> option. | |
| See <a href="Target-Selection.html#Target-Selection">Target Selection</a>, for more information. | |
| <br><dt><samp><span class="env">-C</span></samp><dt><samp><span class="env">--demangle[=</span><var>style</var><span class="env">]</span></samp><dd><a name="index-demangling-in-objdump-73"></a>Decode (<dfn>demangle</dfn>) low-level symbol names into user-level names. | |
| Besides removing any initial underscore prepended by the system, this | |
| makes C++ function names readable. Different compilers have different | |
| mangling styles. The optional demangling style argument can be used to | |
| choose an appropriate demangling style for your compiler. See <a href="c_002b_002bfilt.html#c_002b_002bfilt">c++filt</a>, | |
| for more information on demangling. | |
| <br><dt><samp><span class="env">-g</span></samp><dt><samp><span class="env">--debugging</span></samp><dd>Display debugging information. This attempts to parse STABS and IEEE | |
| debugging format information stored in the file and print it out using | |
| a C like syntax. If neither of these formats are found this option | |
| falls back on the <samp><span class="option">-W</span></samp> option to print any DWARF information in | |
| the file. | |
| <br><dt><samp><span class="env">-e</span></samp><dt><samp><span class="env">--debugging-tags</span></samp><dd>Like <samp><span class="option">-g</span></samp>, but the information is generated in a format compatible | |
| with ctags tool. | |
| <br><dt><samp><span class="env">-d</span></samp><dt><samp><span class="env">--disassemble</span></samp><dd><a name="index-disassembling-object-code-74"></a><a name="index-machine-instructions-75"></a>Display the assembler mnemonics for the machine instructions from | |
| <var>objfile</var>. This option only disassembles those sections which are | |
| expected to contain instructions. | |
| <br><dt><samp><span class="env">-D</span></samp><dt><samp><span class="env">--disassemble-all</span></samp><dd>Like <samp><span class="option">-d</span></samp>, but disassemble the contents of all sections, not just | |
| those expected to contain instructions. | |
| <p>If the target is an ARM architecture this switch also has the effect | |
| of forcing the disassembler to decode pieces of data found in code | |
| sections as if they were instructions. | |
| <br><dt><samp><span class="env">--prefix-addresses</span></samp><dd>When disassembling, print the complete address on each line. This is | |
| the older disassembly format. | |
| <br><dt><samp><span class="env">-EB</span></samp><dt><samp><span class="env">-EL</span></samp><dt><samp><span class="env">--endian={big|little}</span></samp><dd><a name="index-endianness-76"></a><a name="index-disassembly-endianness-77"></a>Specify the endianness of the object files. This only affects | |
| disassembly. This can be useful when disassembling a file format which | |
| does not describe endianness information, such as S-records. | |
| <br><dt><samp><span class="env">-f</span></samp><dt><samp><span class="env">--file-headers</span></samp><dd><a name="index-object-file-header-78"></a>Display summary information from the overall header of | |
| each of the <var>objfile</var> files. | |
| <br><dt><samp><span class="env">-F</span></samp><dt><samp><span class="env">--file-offsets</span></samp><dd><a name="index-object-file-offsets-79"></a>When disassembling sections, whenever a symbol is displayed, also | |
| display the file offset of the region of data that is about to be | |
| dumped. If zeroes are being skipped, then when disassembly resumes, | |
| tell the user how many zeroes were skipped and the file offset of the | |
| location from where the disassembly resumes. When dumping sections, | |
| display the file offset of the location from where the dump starts. | |
| <br><dt><samp><span class="env">--file-start-context</span></samp><dd><a name="index-source-code-context-80"></a>Specify that when displaying interlisted source code/disassembly | |
| (assumes <samp><span class="option">-S</span></samp>) from a file that has not yet been displayed, extend the | |
| context to the start of the file. | |
| <br><dt><samp><span class="env">-h</span></samp><dt><samp><span class="env">--section-headers</span></samp><dt><samp><span class="env">--headers</span></samp><dd><a name="index-section-headers-81"></a>Display summary information from the section headers of the | |
| object file. | |
| <p>File segments may be relocated to nonstandard addresses, for example by | |
| using the <samp><span class="option">-Ttext</span></samp>, <samp><span class="option">-Tdata</span></samp>, or <samp><span class="option">-Tbss</span></samp> options to | |
| <samp><span class="command">ld</span></samp>. However, some object file formats, such as a.out, do not | |
| store the starting address of the file segments. In those situations, | |
| although <samp><span class="command">ld</span></samp> relocates the sections correctly, using ‘<samp><span class="samp">objdump | |
| -h</span></samp>’ to list the file section headers cannot show the correct addresses. | |
| Instead, it shows the usual addresses, which are implicit for the | |
| target. | |
| <br><dt><samp><span class="env">-H</span></samp><dt><samp><span class="env">--help</span></samp><dd>Print a summary of the options to <samp><span class="command">objdump</span></samp> and exit. | |
| <br><dt><samp><span class="env">-i</span></samp><dt><samp><span class="env">--info</span></samp><dd><a name="index-architectures-available-82"></a><a name="index-object-formats-available-83"></a>Display a list showing all architectures and object formats available | |
| for specification with <samp><span class="option">-b</span></samp> or <samp><span class="option">-m</span></samp>. | |
| <br><dt><samp><span class="env">-j </span><var>name</var></samp><dt><samp><span class="env">--section=</span><var>name</var></samp><dd><a name="index-section-information-84"></a>Display information only for section <var>name</var>. | |
| <br><dt><samp><span class="env">-l</span></samp><dt><samp><span class="env">--line-numbers</span></samp><dd><a name="index-source-filenames-for-object-files-85"></a>Label the display (using debugging information) with the filename and | |
| source line numbers corresponding to the object code or relocs shown. | |
| Only useful with <samp><span class="option">-d</span></samp>, <samp><span class="option">-D</span></samp>, or <samp><span class="option">-r</span></samp>. | |
| <br><dt><samp><span class="env">-m </span><var>machine</var></samp><dt><samp><span class="env">--architecture=</span><var>machine</var></samp><dd><a name="index-architecture-86"></a><a name="index-disassembly-architecture-87"></a>Specify the architecture to use when disassembling object files. This | |
| can be useful when disassembling object files which do not describe | |
| architecture information, such as S-records. You can list the available | |
| architectures with the <samp><span class="option">-i</span></samp> option. | |
| <p>If the target is an ARM architecture then this switch has an | |
| additional effect. It restricts the disassembly to only those | |
| instructions supported by the architecture specified by <var>machine</var>. | |
| If it is necessary to use this switch because the input file does not | |
| contain any architecture information, but it is also desired to | |
| disassemble all the instructions use <samp><span class="option">-marm</span></samp>. | |
| <br><dt><samp><span class="env">-M </span><var>options</var></samp><dt><samp><span class="env">--disassembler-options=</span><var>options</var></samp><dd>Pass target specific information to the disassembler. Only supported on | |
| some targets. If it is necessary to specify more than one | |
| disassembler option then multiple <samp><span class="option">-M</span></samp> options can be used or | |
| can be placed together into a comma separated list. | |
| <p>If the target is an ARM architecture then this switch can be used to | |
| select which register name set is used during disassembler. Specifying | |
| <samp><span class="option">-M reg-names-std</span></samp> (the default) will select the register names as | |
| used in ARM's instruction set documentation, but with register 13 called | |
| 'sp', register 14 called 'lr' and register 15 called 'pc'. Specifying | |
| <samp><span class="option">-M reg-names-apcs</span></samp> will select the name set used by the ARM | |
| Procedure Call Standard, whilst specifying <samp><span class="option">-M reg-names-raw</span></samp> will | |
| just use ‘<samp><span class="samp">r</span></samp>’ followed by the register number. | |
| <p>There are also two variants on the APCS register naming scheme enabled | |
| by <samp><span class="option">-M reg-names-atpcs</span></samp> and <samp><span class="option">-M reg-names-special-atpcs</span></samp> which | |
| use the ARM/Thumb Procedure Call Standard naming conventions. (Either | |
| with the normal register names or the special register names). | |
| <p>This option can also be used for ARM architectures to force the | |
| disassembler to interpret all instructions as Thumb instructions by | |
| using the switch <samp><span class="option">--disassembler-options=force-thumb</span></samp>. This can be | |
| useful when attempting to disassemble thumb code produced by other | |
| compilers. | |
| <p>For the x86, some of the options duplicate functions of the <samp><span class="option">-m</span></samp> | |
| switch, but allow finer grained control. Multiple selections from the | |
| following may be specified as a comma separated string. | |
| <samp><span class="option">x86-64</span></samp>, <samp><span class="option">i386</span></samp> and <samp><span class="option">i8086</span></samp> select disassembly for | |
| the given architecture. <samp><span class="option">intel</span></samp> and <samp><span class="option">att</span></samp> select between | |
| intel syntax mode and AT&T syntax mode. | |
| <samp><span class="option">intel-mnemonic</span></samp> and <samp><span class="option">att-mnemonic</span></samp> select between | |
| intel mnemonic mode and AT&T mnemonic mode. <samp><span class="option">intel-mnemonic</span></samp> | |
| implies <samp><span class="option">intel</span></samp> and <samp><span class="option">att-mnemonic</span></samp> implies <samp><span class="option">att</span></samp>. | |
| <samp><span class="option">addr64</span></samp>, <samp><span class="option">addr32</span></samp>, | |
| <samp><span class="option">addr16</span></samp>, <samp><span class="option">data32</span></samp> and <samp><span class="option">data16</span></samp> specify the default | |
| address size and operand size. These four options will be overridden if | |
| <samp><span class="option">x86-64</span></samp>, <samp><span class="option">i386</span></samp> or <samp><span class="option">i8086</span></samp> appear later in the | |
| option string. Lastly, <samp><span class="option">suffix</span></samp>, when in AT&T mode, | |
| instructs the disassembler to print a mnemonic suffix even when the | |
| suffix could be inferred by the operands. | |
| <p>For PowerPC, <samp><span class="option">booke</span></samp> controls the disassembly of BookE | |
| instructions. <samp><span class="option">32</span></samp> and <samp><span class="option">64</span></samp> select PowerPC and | |
| PowerPC64 disassembly, respectively. <samp><span class="option">e300</span></samp> selects | |
| disassembly for the e300 family. <samp><span class="option">440</span></samp> selects disassembly for | |
| the PowerPC 440. <samp><span class="option">ppcps</span></samp> selects disassembly for the paired | |
| single instructions of the PPC750CL. | |
| <p>For MIPS, this option controls the printing of instruction mnemonic | |
| names and register names in disassembled instructions. Multiple | |
| selections from the following may be specified as a comma separated | |
| string, and invalid options are ignored: | |
| <dl> | |
| <dt><code>no-aliases</code><dd>Print the 'raw' instruction mnemonic instead of some pseudo | |
| instruction mnemonic. I.e., print 'daddu' or 'or' instead of 'move', | |
| 'sll' instead of 'nop', etc. | |
| <br><dt><code>gpr-names=</code><var>ABI</var><dd>Print GPR (general-purpose register) names as appropriate | |
| for the specified ABI. By default, GPR names are selected according to | |
| the ABI of the binary being disassembled. | |
| <br><dt><code>fpr-names=</code><var>ABI</var><dd>Print FPR (floating-point register) names as | |
| appropriate for the specified ABI. By default, FPR numbers are printed | |
| rather than names. | |
| <br><dt><code>cp0-names=</code><var>ARCH</var><dd>Print CP0 (system control coprocessor; coprocessor 0) register names | |
| as appropriate for the CPU or architecture specified by | |
| <var>ARCH</var>. By default, CP0 register names are selected according to | |
| the architecture and CPU of the binary being disassembled. | |
| <br><dt><code>hwr-names=</code><var>ARCH</var><dd>Print HWR (hardware register, used by the <code>rdhwr</code> instruction) names | |
| as appropriate for the CPU or architecture specified by | |
| <var>ARCH</var>. By default, HWR names are selected according to | |
| the architecture and CPU of the binary being disassembled. | |
| <br><dt><code>reg-names=</code><var>ABI</var><dd>Print GPR and FPR names as appropriate for the selected ABI. | |
| <br><dt><code>reg-names=</code><var>ARCH</var><dd>Print CPU-specific register names (CP0 register and HWR names) | |
| as appropriate for the selected CPU or architecture. | |
| </dl> | |
| <p>For any of the options listed above, <var>ABI</var> or | |
| <var>ARCH</var> may be specified as ‘<samp><span class="samp">numeric</span></samp>’ to have numbers printed | |
| rather than names, for the selected types of registers. | |
| You can list the available values of <var>ABI</var> and <var>ARCH</var> using | |
| the <samp><span class="option">--help</span></samp> option. | |
| <p>For VAX, you can specify function entry addresses with <samp><span class="option">-M | |
| entry:0xf00ba</span></samp>. You can use this multiple times to properly | |
| disassemble VAX binary files that don't contain symbol tables (like | |
| ROM dumps). In these cases, the function entry mask would otherwise | |
| be decoded as VAX instructions, which would probably lead the rest | |
| of the function being wrongly disassembled. | |
| <br><dt><samp><span class="env">-p</span></samp><dt><samp><span class="env">--private-headers</span></samp><dd>Print information that is specific to the object file format. The exact | |
| information printed depends upon the object file format. For some | |
| object file formats, no additional information is printed. | |
| <br><dt><samp><span class="env">-P </span><var>options</var></samp><dt><samp><span class="env">--private=</span><var>options</var></samp><dd>Print information that is specific to the object file format. The | |
| argument <var>options</var> is a comma separated list that depends on the | |
| format (the lists of options is displayed with the help). | |
| <p>For XCOFF, the available options are: <samp><span class="option">header</span></samp>, <samp><span class="option">aout</span></samp>, | |
| <samp><span class="option">sections</span></samp>, <samp><span class="option">syms</span></samp>, <samp><span class="option">relocs</span></samp>, <samp><span class="option">lineno</span></samp>, | |
| <samp><span class="option">loader</span></samp>, <samp><span class="option">except</span></samp>, <samp><span class="option">typchk</span></samp>, <samp><span class="option">traceback</span></samp> | |
| and <samp><span class="option">toc</span></samp>. | |
| <br><dt><samp><span class="env">-r</span></samp><dt><samp><span class="env">--reloc</span></samp><dd><a name="index-relocation-entries_002c-in-object-file-88"></a>Print the relocation entries of the file. If used with <samp><span class="option">-d</span></samp> or | |
| <samp><span class="option">-D</span></samp>, the relocations are printed interspersed with the | |
| disassembly. | |
| <br><dt><samp><span class="env">-R</span></samp><dt><samp><span class="env">--dynamic-reloc</span></samp><dd><a name="index-dynamic-relocation-entries_002c-in-object-file-89"></a>Print the dynamic relocation entries of the file. This is only | |
| meaningful for dynamic objects, such as certain types of shared | |
| libraries. As for <samp><span class="option">-r</span></samp>, if used with <samp><span class="option">-d</span></samp> or | |
| <samp><span class="option">-D</span></samp>, the relocations are printed interspersed with the | |
| disassembly. | |
| <br><dt><samp><span class="env">-s</span></samp><dt><samp><span class="env">--full-contents</span></samp><dd><a name="index-sections_002c-full-contents-90"></a><a name="index-object-file-sections-91"></a>Display the full contents of any sections requested. By default all | |
| non-empty sections are displayed. | |
| <br><dt><samp><span class="env">-S</span></samp><dt><samp><span class="env">--source</span></samp><dd><a name="index-source-disassembly-92"></a><a name="index-disassembly_002c-with-source-93"></a>Display source code intermixed with disassembly, if possible. Implies | |
| <samp><span class="option">-d</span></samp>. | |
| <br><dt><samp><span class="env">--prefix=</span><var>prefix</var></samp><dd><a name="index-Add-prefix-to-absolute-paths-94"></a>Specify <var>prefix</var> to add to the absolute paths when used with | |
| <samp><span class="option">-S</span></samp>. | |
| <br><dt><samp><span class="env">--prefix-strip=</span><var>level</var></samp><dd><a name="index-Strip-absolute-paths-95"></a>Indicate how many initial directory names to strip off the hardwired | |
| absolute paths. It has no effect without <samp><span class="option">--prefix=</span></samp><var>prefix</var>. | |
| <br><dt><samp><span class="env">--show-raw-insn</span></samp><dd>When disassembling instructions, print the instruction in hex as well as | |
| in symbolic form. This is the default except when | |
| <samp><span class="option">--prefix-addresses</span></samp> is used. | |
| <br><dt><samp><span class="env">--no-show-raw-insn</span></samp><dd>When disassembling instructions, do not print the instruction bytes. | |
| This is the default when <samp><span class="option">--prefix-addresses</span></samp> is used. | |
| <br><dt><samp><span class="env">--insn-width=</span><var>width</var></samp><dd><a name="index-Instruction-width-96"></a>Display <var>width</var> bytes on a single line when disassembling | |
| instructions. | |
| <br><dt><samp><span class="env">-W[lLiaprmfFsoRt]</span></samp><dt><samp><span class="env">--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]</span></samp><dd><a name="index-DWARF-97"></a><a name="index-debug-symbols-98"></a>Displays the contents of the debug sections in the file, if any are | |
| present. If one of the optional letters or words follows the switch | |
| then only data found in those specific sections will be dumped. | |
| <p>Note that there is no single letter option to display the content of | |
| trace sections or .gdb_index. | |
| <p>Note: the output from the <samp><span class="option">=info</span></samp> option can also be affected | |
| by the options <samp><span class="option">--dwarf-depth</span></samp>, the <samp><span class="option">--dwarf-start</span></samp> and | |
| the <samp><span class="option">--dwarf-check</span></samp>. | |
| <br><dt><samp><span class="env">--dwarf-depth=</span><var>n</var></samp><dd>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children. | |
| This is only useful with <samp><span class="option">--dwarf=info</span></samp>. The default is | |
| to print all DIEs; the special value 0 for <var>n</var> will also have this | |
| effect. | |
| <p>With a non-zero value for <var>n</var>, DIEs at or deeper than <var>n</var> | |
| levels will not be printed. The range for <var>n</var> is zero-based. | |
| <br><dt><samp><span class="env">--dwarf-start=</span><var>n</var></samp><dd>Print only DIEs beginning with the DIE numbered <var>n</var>. This is only | |
| useful with <samp><span class="option">--dwarf=info</span></samp>. | |
| <p>If specified, this option will suppress printing of any header | |
| information and all DIEs before the DIE numbered <var>n</var>. Only | |
| siblings and children of the specified DIE will be printed. | |
| <p>This can be used in conjunction with <samp><span class="option">--dwarf-depth</span></samp>. | |
| <br><dt><samp><span class="env">--dwarf-check</span></samp><dd>Enable additional checks for consistency of Dwarf information. | |
| <br><dt><samp><span class="env">-G</span></samp><dt><samp><span class="env">--stabs</span></samp><dd><a name="index-stab-99"></a><a name="index-g_t_002estab-100"></a><a name="index-debug-symbols-101"></a><a name="index-ELF-object-file-format-102"></a>Display the full contents of any sections requested. Display the | |
| contents of the .stab and .stab.index and .stab.excl sections from an | |
| ELF file. This is only useful on systems (such as Solaris 2.0) in which | |
| <code>.stab</code> debugging symbol-table entries are carried in an ELF | |
| section. In most other file formats, debugging symbol-table entries are | |
| interleaved with linkage symbols, and are visible in the <samp><span class="option">--syms</span></samp> | |
| output. | |
| For more information on stabs symbols, see <a href="../stabs/index.html#Top">Stabs</a>. | |
| <br><dt><samp><span class="env">--start-address=</span><var>address</var></samp><dd><a name="index-start_002daddress-103"></a>Start displaying data at the specified address. This affects the output | |
| of the <samp><span class="option">-d</span></samp>, <samp><span class="option">-r</span></samp> and <samp><span class="option">-s</span></samp> options. | |
| <br><dt><samp><span class="env">--stop-address=</span><var>address</var></samp><dd><a name="index-stop_002daddress-104"></a>Stop displaying data at the specified address. This affects the output | |
| of the <samp><span class="option">-d</span></samp>, <samp><span class="option">-r</span></samp> and <samp><span class="option">-s</span></samp> options. | |
| <br><dt><samp><span class="env">-t</span></samp><dt><samp><span class="env">--syms</span></samp><dd><a name="index-symbol-table-entries_002c-printing-105"></a>Print the symbol table entries of the file. | |
| This is similar to the information provided by the ‘<samp><span class="samp">nm</span></samp>’ program, | |
| although the display format is different. The format of the output | |
| depends upon the format of the file being dumped, but there are two main | |
| types. One looks like this: | |
| <pre class="smallexample"> [ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss | |
| [ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred | |
| </pre> | |
| <p>where the number inside the square brackets is the number of the entry | |
| in the symbol table, the <var>sec</var> number is the section number, the | |
| <var>fl</var> value are the symbol's flag bits, the <var>ty</var> number is the | |
| symbol's type, the <var>scl</var> number is the symbol's storage class and | |
| the <var>nx</var> value is the number of auxilary entries associated with | |
| the symbol. The last two fields are the symbol's value and its name. | |
| <p>The other common output format, usually seen with ELF based files, | |
| looks like this: | |
| <pre class="smallexample"> 00000000 l d .bss 00000000 .bss | |
| 00000000 g .text 00000000 fred | |
| </pre> | |
| <p>Here the first number is the symbol's value (sometimes refered to as | |
| its address). The next field is actually a set of characters and | |
| spaces indicating the flag bits that are set on the symbol. These | |
| characters are described below. Next is the section with which the | |
| symbol is associated or <em>*ABS*</em> if the section is absolute (ie | |
| not connected with any section), or <em>*UND*</em> if the section is | |
| referenced in the file being dumped, but not defined there. | |
| <p>After the section name comes another field, a number, which for common | |
| symbols is the alignment and for other symbol is the size. Finally | |
| the symbol's name is displayed. | |
| <p>The flag characters are divided into 7 groups as follows: | |
| <dl> | |
| <dt><code>l</code><dt><code>g</code><dt><code>u</code><dt><code>!</code><dd>The symbol is a local (l), global (g), unique global (u), neither | |
| global nor local (a space) or both global and local (!). A | |
| symbol can be neither local or global for a variety of reasons, e.g., | |
| because it is used for debugging, but it is probably an indication of | |
| a bug if it is ever both local and global. Unique global symbols are | |
| a GNU extension to the standard set of ELF symbol bindings. For such | |
| a symbol the dynamic linker will make sure that in the entire process | |
| there is just one symbol with this name and type in use. | |
| <br><dt><code>w</code><dd>The symbol is weak (w) or strong (a space). | |
| <br><dt><code>C</code><dd>The symbol denotes a constructor (C) or an ordinary symbol (a space). | |
| <br><dt><code>W</code><dd>The symbol is a warning (W) or a normal symbol (a space). A warning | |
| symbol's name is a message to be displayed if the symbol following the | |
| warning symbol is ever referenced. | |
| <br><dt><code>I</code><br><dt><code>i</code><dd>The symbol is an indirect reference to another symbol (I), a function | |
| to be evaluated during reloc processing (i) or a normal symbol (a | |
| space). | |
| <br><dt><code>d</code><dt><code>D</code><dd>The symbol is a debugging symbol (d) or a dynamic symbol (D) or a | |
| normal symbol (a space). | |
| <br><dt><code>F</code><br><dt><code>f</code><br><dt><code>O</code><dd>The symbol is the name of a function (F) or a file (f) or an object | |
| (O) or just a normal symbol (a space). | |
| </dl> | |
| <br><dt><samp><span class="env">-T</span></samp><dt><samp><span class="env">--dynamic-syms</span></samp><dd><a name="index-dynamic-symbol-table-entries_002c-printing-106"></a>Print the dynamic symbol table entries of the file. This is only | |
| meaningful for dynamic objects, such as certain types of shared | |
| libraries. This is similar to the information provided by the ‘<samp><span class="samp">nm</span></samp>’ | |
| program when given the <samp><span class="option">-D</span></samp> (<samp><span class="option">--dynamic</span></samp>) option. | |
| <br><dt><samp><span class="env">--special-syms</span></samp><dd>When displaying symbols include those which the target considers to be | |
| special in some way and which would not normally be of interest to the | |
| user. | |
| <br><dt><samp><span class="env">-V</span></samp><dt><samp><span class="env">--version</span></samp><dd>Print the version number of <samp><span class="command">objdump</span></samp> and exit. | |
| <br><dt><samp><span class="env">-x</span></samp><dt><samp><span class="env">--all-headers</span></samp><dd><a name="index-all-header-information_002c-object-file-107"></a><a name="index-header-information_002c-all-108"></a>Display all available header information, including the symbol table and | |
| relocation entries. Using <samp><span class="option">-x</span></samp> is equivalent to specifying all of | |
| <samp><span class="option">-a -f -h -p -r -t</span></samp>. | |
| <br><dt><samp><span class="env">-w</span></samp><dt><samp><span class="env">--wide</span></samp><dd><a name="index-wide-output_002c-printing-109"></a>Format some lines for output devices that have more than 80 columns. | |
| Also do not truncate symbol names when they are displayed. | |
| <br><dt><samp><span class="env">-z</span></samp><dt><samp><span class="env">--disassemble-zeroes</span></samp><dd>Normally the disassembly output will skip blocks of zeroes. This | |
| option directs the disassembler to disassemble those blocks, just like | |
| any other data. | |
| </dl> | |
| <!-- man end --> | |
| </body></html> | |