📄 objdump.html
字号:
<html lang="en">
<head>
<title>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.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
</head>
<body>
<div class="node">
<p>
Node:<a name="objdump">objdump</a>,
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><br>
</div>
<h2 class="chapter">objdump</h2>
<pre class="smallexample"> objdump [<code>-a</code>|<code>--archive-headers</code>]
[<code>-b</code> <var>bfdname</var>|<code>--target=</code><var>bfdname</var><code></code>]
[<code>-C</code>|<code>--demangle</code>[=<var>style</var>] ]
[<code>-d</code>|<code>--disassemble</code>]
[<code>-D</code>|<code>--disassemble-all</code>]
[<code>-z</code>|<code>--disassemble-zeroes</code>]
[<code>-EB</code>|<code>-EL</code>|<code>--endian=</code>{big | little }]
[<code>-f</code>|<code>--file-headers</code>]
[<code>--file-start-context</code>]
[<code>-g</code>|<code>--debugging</code>]
[<code>-h</code>|<code>--section-headers</code>|<code>--headers</code>]
[<code>-i</code>|<code>--info</code>]
[<code>-j</code> <var>section</var>|<code>--section=</code><var>section</var>]
[<code>-l</code>|<code>--line-numbers</code>]
[<code>-S</code>|<code>--source</code>]
[<code>-m</code> <var>machine</var>|<code>--architecture=</code><var>machine</var>]
[<code>-M</code> <var>options</var>|<code>--disassembler-options=</code><var>options</var>]
[<code>-p</code>|<code>--private-headers</code>]
[<code>-r</code>|<code>--reloc</code>]
[<code>-R</code>|<code>--dynamic-reloc</code>]
[<code>-s</code>|<code>--full-contents</code>]
[<code>-G</code>|<code>--stabs</code>]
[<code>-t</code>|<code>--syms</code>]
[<code>-T</code>|<code>--dynamic-syms</code>]
[<code>-x</code>|<code>--all-headers</code>]
[<code>-w</code>|<code>--wide</code>]
[<code>--start-address=</code><var>address</var>]
[<code>--stop-address=</code><var>address</var>]
[<code>--prefix-addresses</code>]
[<code>--[no-]show-raw-insn</code>]
[<code>--adjust-vma=</code><var>offset</var>]
[<code>-V</code>|<code>--version</code>]
[<code>-H</code>|<code>--help</code>]
<var>objfile</var>...
</pre>
<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><var>objfile</var><small class="dots">...</small> are the object files to be examined. When you
specify archives, <code>objdump</code> shows information on each of the member
object files.
<p>The long and short forms of options, shown here as alternatives, are
equivalent. At least one option from the list
<code>-a,-d,-D,-f,-g,-G,-h,-H,-p,-r,-R,-S,-t,-T,-V,-x</code> must be given.
<dl>
<dt><code>-a</code>
<dd><dt><code>--archive-header</code>
<dd>If any of the <var>objfile</var> files are archives, display the archive
header information (in a format similar to <code>ls -l</code>). Besides the
information you could list with <code>ar tv</code>, <code>objdump -a</code> shows
the object file format of each archive member.
<br><dt><code>--adjust-vma=</code><var>offset</var><code></code>
<dd>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><code>-b </code><var>bfdname</var><code></code>
<dd><dt><code>--target=</code><var>bfdname</var><code></code>
<dd>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>displays summary information from the section headers (<code>-h</code>) of
<code>fu.o</code>, which is explicitly identified (<code>-m</code>) as a VAX object
file in the format produced by Oasys compilers. You can list the
formats available with the <code>-i</code> option.
See <a href="Target-Selection.html#Target%20Selection">Target Selection</a>, for more information.
<br><dt><code>-C</code>
<dd><dt><code>--demangle[=</code><var>style</var><code>]</code>
<dd>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--filt.html#c++filt">c++filt</a>,
for more information on demangling.
<br><dt><code>-G</code>
<dd><br><dt><code>--debugging</code>
<dd>Display debugging information. This attempts to parse debugging
information stored in the file and print it out using a C like syntax.
Only certain types of debugging information have been implemented.
<br><dt><code>-d</code>
<dd><dt><code>--disassemble</code>
<dd>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><code>-D</code>
<dd><dt><code>--disassemble-all</code>
<dd>Like <code>-d</code>, but disassemble the contents of all sections, not just
those expected to contain instructions.
<br><dt><code>--prefix-addresses</code>
<dd>When disassembling, print the complete address on each line. This is
the older disassembly format.
<br><dt><code>--disassemble-zeroes</code>
<dd>Normally the disassembly output will skip blocks of zeroes. This
option directs the disassembler to disassemble those blocks, just like
any other data.
<br><dt><code>-EB</code>
<dd><dt><code>-EL</code>
<dd><dt><code>--endian={big|little}</code>
<dd>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><code>-f</code>
<dd><dt><code>--file-header</code>
<dd>Display summary information from the overall header of
each of the <var>objfile</var> files.
<br><dt><code>--file-start-context</code>
<dd>Specify that when displaying interlisted source code/disassembly
(assumes <code>-S</code>) from a file that has not yet been displayed, extend the
context to the start of the file.
<br><dt><code>-h</code>
<dd><dt><code>--section-header</code>
<dd><dt><code>--header</code>
<dd>Display summary information from the section headers of the
object file.
<p>File segments may be relocated to nonstandard addresses, for example by
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -