| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <!-- Copyright (C) 1991-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". |
| --> |
| <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ --> |
| <head> |
| <title>GNU Binary Utilities: objdump</title> |
| |
| <meta name="description" content="GNU Binary Utilities: objdump"> |
| <meta name="keywords" content="GNU Binary Utilities: objdump"> |
| <meta name="resource-type" content="document"> |
| <meta name="distribution" content="global"> |
| <meta name="Generator" content="makeinfo"> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link href="index.html#Top" rel="start" title="Top"> |
| <link href="Binutils-Index.html#Binutils-Index" rel="index" title="Binutils Index"> |
| <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> |
| <link href="index.html#Top" rel="up" title="Top"> |
| <link href="ranlib.html#ranlib" rel="next" title="ranlib"> |
| <link href="objcopy.html#objcopy" rel="prev" title="objcopy"> |
| <style type="text/css"> |
| <!-- |
| a.summary-letter {text-decoration: none} |
| blockquote.smallquotation {font-size: smaller} |
| div.display {margin-left: 3.2em} |
| div.example {margin-left: 3.2em} |
| div.indentedblock {margin-left: 3.2em} |
| div.lisp {margin-left: 3.2em} |
| div.smalldisplay {margin-left: 3.2em} |
| div.smallexample {margin-left: 3.2em} |
| div.smallindentedblock {margin-left: 3.2em; font-size: smaller} |
| div.smalllisp {margin-left: 3.2em} |
| kbd {font-style:oblique} |
| pre.display {font-family: inherit} |
| pre.format {font-family: inherit} |
| pre.menu-comment {font-family: serif} |
| pre.menu-preformatted {font-family: serif} |
| pre.smalldisplay {font-family: inherit; font-size: smaller} |
| pre.smallexample {font-size: smaller} |
| pre.smallformat {font-family: inherit; font-size: smaller} |
| pre.smalllisp {font-size: smaller} |
| span.nocodebreak {white-space:nowrap} |
| span.nolinebreak {white-space:nowrap} |
| span.roman {font-family:serif; font-weight:normal} |
| span.sansserif {font-family:sans-serif; font-weight:normal} |
| ul.no-bullet {list-style: none} |
| --> |
| </style> |
| |
| |
| </head> |
| |
| <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> |
| <a name="objdump"></a> |
| <div class="header"> |
| <p> |
| Next: <a href="ranlib.html#ranlib" accesskey="n" rel="next">ranlib</a>, Previous: <a href="objcopy.html#objcopy" accesskey="p" rel="prev">objcopy</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| <hr> |
| <a name="objdump-1"></a> |
| <h2 class="chapter">4 objdump</h2> |
| |
| <a name="index-object-file-information"></a> |
| <a name="index-objdump"></a> |
| |
| |
| <div class="smallexample"> |
| <pre class="smallexample">objdump [<samp>-a</samp>|<samp>--archive-headers</samp>] |
| [<samp>-b</samp> <var>bfdname</var>|<samp>--target=<var>bfdname</var></samp>] |
| [<samp>-C</samp>|<samp>--demangle</samp>[=<var>style</var>] ] |
| [<samp>-d</samp>|<samp>--disassemble</samp>] |
| [<samp>-D</samp>|<samp>--disassemble-all</samp>] |
| [<samp>-z</samp>|<samp>--disassemble-zeroes</samp>] |
| [<samp>-EB</samp>|<samp>-EL</samp>|<samp>--endian=</samp>{big | little }] |
| [<samp>-f</samp>|<samp>--file-headers</samp>] |
| [<samp>-F</samp>|<samp>--file-offsets</samp>] |
| [<samp>--file-start-context</samp>] |
| [<samp>-g</samp>|<samp>--debugging</samp>] |
| [<samp>-e</samp>|<samp>--debugging-tags</samp>] |
| [<samp>-h</samp>|<samp>--section-headers</samp>|<samp>--headers</samp>] |
| [<samp>-i</samp>|<samp>--info</samp>] |
| [<samp>-j</samp> <var>section</var>|<samp>--section=</samp><var>section</var>] |
| [<samp>-l</samp>|<samp>--line-numbers</samp>] |
| [<samp>-S</samp>|<samp>--source</samp>] |
| [<samp>-m</samp> <var>machine</var>|<samp>--architecture=</samp><var>machine</var>] |
| [<samp>-M</samp> <var>options</var>|<samp>--disassembler-options=</samp><var>options</var>] |
| [<samp>-p</samp>|<samp>--private-headers</samp>] |
| [<samp>-P</samp> <var>options</var>|<samp>--private=</samp><var>options</var>] |
| [<samp>-r</samp>|<samp>--reloc</samp>] |
| [<samp>-R</samp>|<samp>--dynamic-reloc</samp>] |
| [<samp>-s</samp>|<samp>--full-contents</samp>] |
| [<samp>-W[lLiaprmfFsoRt]</samp>| |
| <samp>--dwarf</samp>[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]] |
| [<samp>-G</samp>|<samp>--stabs</samp>] |
| [<samp>-t</samp>|<samp>--syms</samp>] |
| [<samp>-T</samp>|<samp>--dynamic-syms</samp>] |
| [<samp>-x</samp>|<samp>--all-headers</samp>] |
| [<samp>-w</samp>|<samp>--wide</samp>] |
| [<samp>--start-address=</samp><var>address</var>] |
| [<samp>--stop-address=</samp><var>address</var>] |
| [<samp>--prefix-addresses</samp>] |
| [<samp>--[no-]show-raw-insn</samp>] |
| [<samp>--adjust-vma=</samp><var>offset</var>] |
| [<samp>--special-syms</samp>] |
| [<samp>--prefix=</samp><var>prefix</var>] |
| [<samp>--prefix-strip=</samp><var>level</var>] |
| [<samp>--insn-width=</samp><var>width</var>] |
| [<samp>-V</samp>|<samp>--version</samp>] |
| [<samp>-H</samp>|<samp>--help</samp>] |
| <var>objfile</var>… |
| </pre></div> |
| |
| |
| <p><code>objdump</code> 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> |
| <p><var>objfile</var>… are the object files to be examined. When you |
| specify archives, <code>objdump</code> shows information on each of the member |
| object files. |
| </p> |
| |
| |
| <p>The long and short forms of options, shown here as alternatives, are |
| equivalent. At least one option from the list |
| <samp>-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-P,-r,-R,-s,-S,-t,-T,-V,-x</samp> must be given. |
| </p> |
| <dl compact="compact"> |
| <dt><code>-a</code></dt> |
| <dt><code>--archive-header</code></dt> |
| <dd><a name="index-archive-headers"></a> |
| <p>If any of the <var>objfile</var> files are archives, display the archive |
| header information (in a format similar to ‘<samp>ls -l</samp>’). Besides the |
| information you could list with ‘<samp>ar tv</samp>’, ‘<samp>objdump -a</samp>’ shows |
| the object file format of each archive member. |
| </p> |
| </dd> |
| <dt><code>--adjust-vma=<var>offset</var></code></dt> |
| <dd><a name="index-section-addresses-in-objdump"></a> |
| <a name="index-VMA-in-objdump"></a> |
| <p>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. |
| </p> |
| </dd> |
| <dt><code>-b <var>bfdname</var></code></dt> |
| <dt><code>--target=<var>bfdname</var></code></dt> |
| <dd><a name="index-object-code-format-1"></a> |
| <p>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> |
| <p>For example, |
| </p><div class="example"> |
| <pre class="example">objdump -b oasys -m vax -h fu.o |
| </pre></div> |
| <p>displays summary information from the section headers (<samp>-h</samp>) of |
| <samp>fu.o</samp>, which is explicitly identified (<samp>-m</samp>) as a VAX object |
| file in the format produced by Oasys compilers. You can list the |
| formats available with the <samp>-i</samp> option. |
| See <a href="Target-Selection.html#Target-Selection">Target Selection</a>, for more information. |
| </p> |
| </dd> |
| <dt><code>-C</code></dt> |
| <dt><code>--demangle[=<var>style</var>]</code></dt> |
| <dd><a name="index-demangling-in-objdump"></a> |
| <p>Decode (<em>demangle</em>) 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. |
| </p> |
| </dd> |
| <dt><code>-g</code></dt> |
| <dt><code>--debugging</code></dt> |
| <dd><p>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>-W</samp> option to print any DWARF information in |
| the file. |
| </p> |
| </dd> |
| <dt><code>-e</code></dt> |
| <dt><code>--debugging-tags</code></dt> |
| <dd><p>Like <samp>-g</samp>, but the information is generated in a format compatible |
| with ctags tool. |
| </p> |
| </dd> |
| <dt><code>-d</code></dt> |
| <dt><code>--disassemble</code></dt> |
| <dd><a name="index-disassembling-object-code"></a> |
| <a name="index-machine-instructions"></a> |
| <p>Display the assembler mnemonics for the machine instructions from |
| <var>objfile</var>. This option only disassembles those sections which are |
| expected to contain instructions. |
| </p> |
| </dd> |
| <dt><code>-D</code></dt> |
| <dt><code>--disassemble-all</code></dt> |
| <dd><p>Like <samp>-d</samp>, but disassemble the contents of all sections, not just |
| those expected to contain instructions. |
| </p> |
| <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. |
| </p> |
| </dd> |
| <dt><code>--prefix-addresses</code></dt> |
| <dd><p>When disassembling, print the complete address on each line. This is |
| the older disassembly format. |
| </p> |
| </dd> |
| <dt><code>-EB</code></dt> |
| <dt><code>-EL</code></dt> |
| <dt><code>--endian={big|little}</code></dt> |
| <dd><a name="index-endianness"></a> |
| <a name="index-disassembly-endianness"></a> |
| <p>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. |
| </p> |
| </dd> |
| <dt><code>-f</code></dt> |
| <dt><code>--file-headers</code></dt> |
| <dd><a name="index-object-file-header"></a> |
| <p>Display summary information from the overall header of |
| each of the <var>objfile</var> files. |
| </p> |
| </dd> |
| <dt><code>-F</code></dt> |
| <dt><code>--file-offsets</code></dt> |
| <dd><a name="index-object-file-offsets"></a> |
| <p>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. |
| </p> |
| </dd> |
| <dt><code>--file-start-context</code></dt> |
| <dd><a name="index-source-code-context"></a> |
| <p>Specify that when displaying interlisted source code/disassembly |
| (assumes <samp>-S</samp>) from a file that has not yet been displayed, extend the |
| context to the start of the file. |
| </p> |
| </dd> |
| <dt><code>-h</code></dt> |
| <dt><code>--section-headers</code></dt> |
| <dt><code>--headers</code></dt> |
| <dd><a name="index-section-headers"></a> |
| <p>Display summary information from the section headers of the |
| object file. |
| </p> |
| <p>File segments may be relocated to nonstandard addresses, for example by |
| using the <samp>-Ttext</samp>, <samp>-Tdata</samp>, or <samp>-Tbss</samp> options to |
| <code>ld</code>. However, some object file formats, such as a.out, do not |
| store the starting address of the file segments. In those situations, |
| although <code>ld</code> relocates the sections correctly, using ‘<samp>objdump |
| -h</samp>’ to list the file section headers cannot show the correct addresses. |
| Instead, it shows the usual addresses, which are implicit for the |
| target. |
| </p> |
| </dd> |
| <dt><code>-H</code></dt> |
| <dt><code>--help</code></dt> |
| <dd><p>Print a summary of the options to <code>objdump</code> and exit. |
| </p> |
| </dd> |
| <dt><code>-i</code></dt> |
| <dt><code>--info</code></dt> |
| <dd><a name="index-architectures-available"></a> |
| <a name="index-object-formats-available"></a> |
| <p>Display a list showing all architectures and object formats available |
| for specification with <samp>-b</samp> or <samp>-m</samp>. |
| </p> |
| </dd> |
| <dt><code>-j <var>name</var></code></dt> |
| <dt><code>--section=<var>name</var></code></dt> |
| <dd><a name="index-section-information"></a> |
| <p>Display information only for section <var>name</var>. |
| </p> |
| </dd> |
| <dt><code>-l</code></dt> |
| <dt><code>--line-numbers</code></dt> |
| <dd><a name="index-source-filenames-for-object-files"></a> |
| <p>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>-d</samp>, <samp>-D</samp>, or <samp>-r</samp>. |
| </p> |
| </dd> |
| <dt><code>-m <var>machine</var></code></dt> |
| <dt><code>--architecture=<var>machine</var></code></dt> |
| <dd><a name="index-architecture"></a> |
| <a name="index-disassembly-architecture"></a> |
| <p>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>-i</samp> option. |
| </p> |
| <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>-marm</samp>. |
| </p> |
| </dd> |
| <dt><code>-M <var>options</var></code></dt> |
| <dt><code>--disassembler-options=<var>options</var></code></dt> |
| <dd><p>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>-M</samp> options can be used or |
| can be placed together into a comma separated list. |
| </p> |
| <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>-M reg-names-std</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>-M reg-names-apcs</samp> will select the name set used by the ARM |
| Procedure Call Standard, whilst specifying <samp>-M reg-names-raw</samp> will |
| just use ‘<samp>r</samp>’ followed by the register number. |
| </p> |
| <p>There are also two variants on the APCS register naming scheme enabled |
| by <samp>-M reg-names-atpcs</samp> and <samp>-M reg-names-special-atpcs</samp> which |
| use the ARM/Thumb Procedure Call Standard naming conventions. (Either |
| with the normal register names or the special register names). |
| </p> |
| <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>--disassembler-options=force-thumb</samp>. This can be |
| useful when attempting to disassemble thumb code produced by other |
| compilers. |
| </p> |
| <p>For the x86, some of the options duplicate functions of the <samp>-m</samp> |
| switch, but allow finer grained control. Multiple selections from the |
| following may be specified as a comma separated string. |
| <samp>x86-64</samp>, <samp>i386</samp> and <samp>i8086</samp> select disassembly for |
| the given architecture. <samp>intel</samp> and <samp>att</samp> select between |
| intel syntax mode and AT&T syntax mode. |
| <samp>intel-mnemonic</samp> and <samp>att-mnemonic</samp> select between |
| intel mnemonic mode and AT&T mnemonic mode. <samp>intel-mnemonic</samp> |
| implies <samp>intel</samp> and <samp>att-mnemonic</samp> implies <samp>att</samp>. |
| <samp>addr64</samp>, <samp>addr32</samp>, |
| <samp>addr16</samp>, <samp>data32</samp> and <samp>data16</samp> specify the default |
| address size and operand size. These four options will be overridden if |
| <samp>x86-64</samp>, <samp>i386</samp> or <samp>i8086</samp> appear later in the |
| option string. Lastly, <samp>suffix</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> |
| <p>For PowerPC, <samp>booke</samp> controls the disassembly of BookE |
| instructions. <samp>32</samp> and <samp>64</samp> select PowerPC and |
| PowerPC64 disassembly, respectively. <samp>e300</samp> selects |
| disassembly for the e300 family. <samp>440</samp> selects disassembly for |
| the PowerPC 440. <samp>ppcps</samp> selects disassembly for the paired |
| single instructions of the PPC750CL. |
| </p> |
| <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: |
| </p> |
| <dl compact="compact"> |
| <dt><code>no-aliases</code></dt> |
| <dd><p>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. |
| </p> |
| </dd> |
| <dt><code>virt</code></dt> |
| <dd><p>Disassemble the virtualization ASE instructions. |
| </p> |
| </dd> |
| <dt><code>gpr-names=<var>ABI</var></code></dt> |
| <dd><p>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. |
| </p> |
| </dd> |
| <dt><code>fpr-names=<var>ABI</var></code></dt> |
| <dd><p>Print FPR (floating-point register) names as |
| appropriate for the specified ABI. By default, FPR numbers are printed |
| rather than names. |
| </p> |
| </dd> |
| <dt><code>cp0-names=<var>ARCH</var></code></dt> |
| <dd><p>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. |
| </p> |
| </dd> |
| <dt><code>hwr-names=<var>ARCH</var></code></dt> |
| <dd><p>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. |
| </p> |
| </dd> |
| <dt><code>reg-names=<var>ABI</var></code></dt> |
| <dd><p>Print GPR and FPR names as appropriate for the selected ABI. |
| </p> |
| </dd> |
| <dt><code>reg-names=<var>ARCH</var></code></dt> |
| <dd><p>Print CPU-specific register names (CP0 register and HWR names) |
| as appropriate for the selected CPU or architecture. |
| </p></dd> |
| </dl> |
| |
| <p>For any of the options listed above, <var>ABI</var> or |
| <var>ARCH</var> may be specified as ‘<samp>numeric</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>--help</samp> option. |
| </p> |
| <p>For VAX, you can specify function entry addresses with <samp>-M |
| entry:0xf00ba</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. |
| </p> |
| </dd> |
| <dt><code>-p</code></dt> |
| <dt><code>--private-headers</code></dt> |
| <dd><p>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. |
| </p> |
| </dd> |
| <dt><code>-P <var>options</var></code></dt> |
| <dt><code>--private=<var>options</var></code></dt> |
| <dd><p>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> |
| <p>For XCOFF, the available options are: <samp>header</samp>, <samp>aout</samp>, |
| <samp>sections</samp>, <samp>syms</samp>, <samp>relocs</samp>, <samp>lineno</samp>, |
| <samp>loader</samp>, <samp>except</samp>, <samp>typchk</samp>, <samp>traceback</samp>, |
| <samp>toc</samp> and <samp>ldinfo</samp>. |
| </p> |
| </dd> |
| <dt><code>-r</code></dt> |
| <dt><code>--reloc</code></dt> |
| <dd><a name="index-relocation-entries_002c-in-object-file"></a> |
| <p>Print the relocation entries of the file. If used with <samp>-d</samp> or |
| <samp>-D</samp>, the relocations are printed interspersed with the |
| disassembly. |
| </p> |
| </dd> |
| <dt><code>-R</code></dt> |
| <dt><code>--dynamic-reloc</code></dt> |
| <dd><a name="index-dynamic-relocation-entries_002c-in-object-file"></a> |
| <p>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>-r</samp>, if used with <samp>-d</samp> or |
| <samp>-D</samp>, the relocations are printed interspersed with the |
| disassembly. |
| </p> |
| </dd> |
| <dt><code>-s</code></dt> |
| <dt><code>--full-contents</code></dt> |
| <dd><a name="index-sections_002c-full-contents"></a> |
| <a name="index-object-file-sections"></a> |
| <p>Display the full contents of any sections requested. By default all |
| non-empty sections are displayed. |
| </p> |
| </dd> |
| <dt><code>-S</code></dt> |
| <dt><code>--source</code></dt> |
| <dd><a name="index-source-disassembly"></a> |
| <a name="index-disassembly_002c-with-source"></a> |
| <p>Display source code intermixed with disassembly, if possible. Implies |
| <samp>-d</samp>. |
| </p> |
| </dd> |
| <dt><code>--prefix=<var>prefix</var></code></dt> |
| <dd><a name="index-Add-prefix-to-absolute-paths"></a> |
| <p>Specify <var>prefix</var> to add to the absolute paths when used with |
| <samp>-S</samp>. |
| </p> |
| </dd> |
| <dt><code>--prefix-strip=<var>level</var></code></dt> |
| <dd><a name="index-Strip-absolute-paths"></a> |
| <p>Indicate how many initial directory names to strip off the hardwired |
| absolute paths. It has no effect without <samp>--prefix=</samp><var>prefix</var>. |
| </p> |
| </dd> |
| <dt><code>--show-raw-insn</code></dt> |
| <dd><p>When disassembling instructions, print the instruction in hex as well as |
| in symbolic form. This is the default except when |
| <samp>--prefix-addresses</samp> is used. |
| </p> |
| </dd> |
| <dt><code>--no-show-raw-insn</code></dt> |
| <dd><p>When disassembling instructions, do not print the instruction bytes. |
| This is the default when <samp>--prefix-addresses</samp> is used. |
| </p> |
| </dd> |
| <dt><code>--insn-width=<var>width</var></code></dt> |
| <dd><a name="index-Instruction-width"></a> |
| <p>Display <var>width</var> bytes on a single line when disassembling |
| instructions. |
| </p> |
| </dd> |
| <dt><code>-W[lLiaprmfFsoRt]</code></dt> |
| <dt><code>--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]</code></dt> |
| <dd><a name="index-DWARF"></a> |
| <a name="index-debug-symbols"></a> |
| <p>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> |
| <p>Note that there is no single letter option to display the content of |
| trace sections or .gdb_index. |
| </p> |
| <p>Note: the output from the <samp>=info</samp> option can also be affected |
| by the options <samp>--dwarf-depth</samp>, the <samp>--dwarf-start</samp> and |
| the <samp>--dwarf-check</samp>. |
| </p> |
| </dd> |
| <dt><code>--dwarf-depth=<var>n</var></code></dt> |
| <dd><p>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children. |
| This is only useful with <samp>--dwarf=info</samp>. The default is |
| to print all DIEs; the special value 0 for <var>n</var> will also have this |
| effect. |
| </p> |
| <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. |
| </p> |
| </dd> |
| <dt><code>--dwarf-start=<var>n</var></code></dt> |
| <dd><p>Print only DIEs beginning with the DIE numbered <var>n</var>. This is only |
| useful with <samp>--dwarf=info</samp>. |
| </p> |
| <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> |
| <p>This can be used in conjunction with <samp>--dwarf-depth</samp>. |
| </p> |
| </dd> |
| <dt><code>--dwarf-check</code></dt> |
| <dd><p>Enable additional checks for consistency of Dwarf information. |
| </p> |
| </dd> |
| <dt><code>-G</code></dt> |
| <dt><code>--stabs</code></dt> |
| <dd><a name="index-stab"></a> |
| <a name="index-_002estab"></a> |
| <a name="index-debug-symbols-1"></a> |
| <a name="index-ELF-object-file-format"></a> |
| <p>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>--syms</samp> |
| output. |
| </p> |
| </dd> |
| <dt><code>--start-address=<var>address</var></code></dt> |
| <dd><a name="index-start_002daddress"></a> |
| <p>Start displaying data at the specified address. This affects the output |
| of the <samp>-d</samp>, <samp>-r</samp> and <samp>-s</samp> options. |
| </p> |
| </dd> |
| <dt><code>--stop-address=<var>address</var></code></dt> |
| <dd><a name="index-stop_002daddress"></a> |
| <p>Stop displaying data at the specified address. This affects the output |
| of the <samp>-d</samp>, <samp>-r</samp> and <samp>-s</samp> options. |
| </p> |
| </dd> |
| <dt><code>-t</code></dt> |
| <dt><code>--syms</code></dt> |
| <dd><a name="index-symbol-table-entries_002c-printing"></a> |
| <p>Print the symbol table entries of the file. |
| This is similar to the information provided by the ‘<samp>nm</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: |
| </p> |
| <div class="smallexample"> |
| <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></div> |
| |
| <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> |
| <p>The other common output format, usually seen with ELF based files, |
| looks like this: |
| </p> |
| <div class="smallexample"> |
| <pre class="smallexample">00000000 l d .bss 00000000 .bss |
| 00000000 g .text 00000000 fred |
| </pre></div> |
| |
| <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> |
| <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> |
| <p>The flag characters are divided into 7 groups as follows: |
| </p><dl compact="compact"> |
| <dt><code>l</code></dt> |
| <dt><code>g</code></dt> |
| <dt><code>u</code></dt> |
| <dt><code>!</code></dt> |
| <dd><p>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. |
| </p> |
| </dd> |
| <dt><code>w</code></dt> |
| <dd><p>The symbol is weak (w) or strong (a space). |
| </p> |
| </dd> |
| <dt><code>C</code></dt> |
| <dd><p>The symbol denotes a constructor (C) or an ordinary symbol (a space). |
| </p> |
| </dd> |
| <dt><code>W</code></dt> |
| <dd><p>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. |
| </p> |
| </dd> |
| <dt><code>I</code></dt> |
| <dt><code>i</code></dt> |
| <dd><p>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). |
| </p> |
| </dd> |
| <dt><code>d</code></dt> |
| <dt><code>D</code></dt> |
| <dd><p>The symbol is a debugging symbol (d) or a dynamic symbol (D) or a |
| normal symbol (a space). |
| </p> |
| </dd> |
| <dt><code>F</code></dt> |
| <dt><code>f</code></dt> |
| <dt><code>O</code></dt> |
| <dd><p>The symbol is the name of a function (F) or a file (f) or an object |
| (O) or just a normal symbol (a space). |
| </p></dd> |
| </dl> |
| |
| </dd> |
| <dt><code>-T</code></dt> |
| <dt><code>--dynamic-syms</code></dt> |
| <dd><a name="index-dynamic-symbol-table-entries_002c-printing"></a> |
| <p>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>nm</samp>’ |
| program when given the <samp>-D</samp> (<samp>--dynamic</samp>) option. |
| </p> |
| </dd> |
| <dt><code>--special-syms</code></dt> |
| <dd><p>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. |
| </p> |
| </dd> |
| <dt><code>-V</code></dt> |
| <dt><code>--version</code></dt> |
| <dd><p>Print the version number of <code>objdump</code> and exit. |
| </p> |
| </dd> |
| <dt><code>-x</code></dt> |
| <dt><code>--all-headers</code></dt> |
| <dd><a name="index-all-header-information_002c-object-file"></a> |
| <a name="index-header-information_002c-all"></a> |
| <p>Display all available header information, including the symbol table and |
| relocation entries. Using <samp>-x</samp> is equivalent to specifying all of |
| <samp>-a -f -h -p -r -t</samp>. |
| </p> |
| </dd> |
| <dt><code>-w</code></dt> |
| <dt><code>--wide</code></dt> |
| <dd><a name="index-wide-output_002c-printing"></a> |
| <p>Format some lines for output devices that have more than 80 columns. |
| Also do not truncate symbol names when they are displayed. |
| </p> |
| </dd> |
| <dt><code>-z</code></dt> |
| <dt><code>--disassemble-zeroes</code></dt> |
| <dd><p>Normally the disassembly output will skip blocks of zeroes. This |
| option directs the disassembler to disassemble those blocks, just like |
| any other data. |
| </p></dd> |
| </dl> |
| |
| |
| |
| <hr> |
| <div class="header"> |
| <p> |
| Next: <a href="ranlib.html#ranlib" accesskey="n" rel="next">ranlib</a>, Previous: <a href="objcopy.html#objcopy" accesskey="p" rel="prev">objcopy</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| |
| |
| |
| </body> |
| </html> |