You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1072 lines
45KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1991-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3
  6. or any later version published by the Free Software Foundation;
  7. with no Invariant Sections, with no Front-Cover Texts, and with no
  8. Back-Cover Texts. A copy of the license is included in the
  9. section entitled "GNU Free Documentation License".
  10. -->
  11. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <title>objdump (GNU Binary Utilities)</title>
  15. <meta name="description" content="objdump (GNU Binary Utilities)">
  16. <meta name="keywords" content="objdump (GNU Binary Utilities)">
  17. <meta name="resource-type" content="document">
  18. <meta name="distribution" content="global">
  19. <meta name="Generator" content="makeinfo">
  20. <link href="index.html#Top" rel="start" title="Top">
  21. <link href="Binutils-Index.html#Binutils-Index" rel="index" title="Binutils Index">
  22. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  23. <link href="index.html#Top" rel="up" title="Top">
  24. <link href="ranlib.html#ranlib" rel="next" title="ranlib">
  25. <link href="objcopy.html#objcopy" rel="prev" title="objcopy">
  26. <style type="text/css">
  27. <!--
  28. a.summary-letter {text-decoration: none}
  29. blockquote.indentedblock {margin-right: 0em}
  30. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  37. div.smalllisp {margin-left: 3.2em}
  38. kbd {font-style: oblique}
  39. pre.display {font-family: inherit}
  40. pre.format {font-family: inherit}
  41. pre.menu-comment {font-family: serif}
  42. pre.menu-preformatted {font-family: serif}
  43. pre.smalldisplay {font-family: inherit; font-size: smaller}
  44. pre.smallexample {font-size: smaller}
  45. pre.smallformat {font-family: inherit; font-size: smaller}
  46. pre.smalllisp {font-size: smaller}
  47. span.nolinebreak {white-space: nowrap}
  48. span.roman {font-family: initial; font-weight: normal}
  49. span.sansserif {font-family: sans-serif; font-weight: normal}
  50. ul.no-bullet {list-style: none}
  51. -->
  52. </style>
  53. </head>
  54. <body lang="en">
  55. <a name="objdump"></a>
  56. <div class="header">
  57. <p>
  58. 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> &nbsp; [<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>
  59. </div>
  60. <hr>
  61. <a name="objdump-1"></a>
  62. <h2 class="chapter">4 objdump</h2>
  63. <a name="index-object-file-information"></a>
  64. <a name="index-objdump"></a>
  65. <div class="smallexample">
  66. <pre class="smallexample">objdump [<samp>-a</samp>|<samp>--archive-headers</samp>]
  67. [<samp>-b</samp> <var>bfdname</var>|<samp>--target=<var>bfdname</var></samp>]
  68. [<samp>-C</samp>|<samp>--demangle</samp>[=<var>style</var>] ]
  69. [<samp>-d</samp>|<samp>--disassemble</samp>[=<var>symbol</var>]]
  70. [<samp>-D</samp>|<samp>--disassemble-all</samp>]
  71. [<samp>-z</samp>|<samp>--disassemble-zeroes</samp>]
  72. [<samp>-EB</samp>|<samp>-EL</samp>|<samp>--endian=</samp>{big | little }]
  73. [<samp>-f</samp>|<samp>--file-headers</samp>]
  74. [<samp>-F</samp>|<samp>--file-offsets</samp>]
  75. [<samp>--file-start-context</samp>]
  76. [<samp>-g</samp>|<samp>--debugging</samp>]
  77. [<samp>-e</samp>|<samp>--debugging-tags</samp>]
  78. [<samp>-h</samp>|<samp>--section-headers</samp>|<samp>--headers</samp>]
  79. [<samp>-i</samp>|<samp>--info</samp>]
  80. [<samp>-j</samp> <var>section</var>|<samp>--section=</samp><var>section</var>]
  81. [<samp>-l</samp>|<samp>--line-numbers</samp>]
  82. [<samp>-S</samp>|<samp>--source</samp>]
  83. [<samp>--source-comment</samp>[=<var>text</var>]]
  84. [<samp>-m</samp> <var>machine</var>|<samp>--architecture=</samp><var>machine</var>]
  85. [<samp>-M</samp> <var>options</var>|<samp>--disassembler-options=</samp><var>options</var>]
  86. [<samp>-p</samp>|<samp>--private-headers</samp>]
  87. [<samp>-P</samp> <var>options</var>|<samp>--private=</samp><var>options</var>]
  88. [<samp>-r</samp>|<samp>--reloc</samp>]
  89. [<samp>-R</samp>|<samp>--dynamic-reloc</samp>]
  90. [<samp>-s</samp>|<samp>--full-contents</samp>]
  91. [<samp>-W[lLiaprmfFsoORtUuTgAckK]</samp>|
  92. <samp>--dwarf</samp>[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]]
  93. [<samp>--ctf=</samp><var>section</var>]
  94. [<samp>-G</samp>|<samp>--stabs</samp>]
  95. [<samp>-t</samp>|<samp>--syms</samp>]
  96. [<samp>-T</samp>|<samp>--dynamic-syms</samp>]
  97. [<samp>-x</samp>|<samp>--all-headers</samp>]
  98. [<samp>-w</samp>|<samp>--wide</samp>]
  99. [<samp>--start-address=</samp><var>address</var>]
  100. [<samp>--stop-address=</samp><var>address</var>]
  101. [<samp>--no-addresses</samp>]
  102. [<samp>--prefix-addresses</samp>]
  103. [<samp>--[no-]show-raw-insn</samp>]
  104. [<samp>--adjust-vma=</samp><var>offset</var>]
  105. [<samp>--dwarf-depth=<var>n</var></samp>]
  106. [<samp>--dwarf-start=<var>n</var></samp>]
  107. [<samp>--ctf-parent=</samp><var>section</var>]
  108. [<samp>--no-recurse-limit</samp>|<samp>--recurse-limit</samp>]
  109. [<samp>--special-syms</samp>]
  110. [<samp>--prefix=</samp><var>prefix</var>]
  111. [<samp>--prefix-strip=</samp><var>level</var>]
  112. [<samp>--insn-width=</samp><var>width</var>]
  113. [<samp>--visualize-jumps[=color|=extended-color|=off]</samp>
  114. [<samp>-V</samp>|<samp>--version</samp>]
  115. [<samp>-H</samp>|<samp>--help</samp>]
  116. <var>objfile</var>&hellip;
  117. </pre></div>
  118. <p><code>objdump</code> displays information about one or more object files.
  119. The options control what particular information to display. This
  120. information is mostly useful to programmers who are working on the
  121. compilation tools, as opposed to programmers who just want their
  122. program to compile and work.
  123. </p>
  124. <p><var>objfile</var>&hellip; are the object files to be examined. When you
  125. specify archives, <code>objdump</code> shows information on each of the member
  126. object files.
  127. </p>
  128. <p>The long and short forms of options, shown here as alternatives, are
  129. equivalent. At least one option from the list
  130. <samp>-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-P,-r,-R,-s,-S,-t,-T,-V,-x</samp> must be given.
  131. </p>
  132. <dl compact="compact">
  133. <dt><code>-a</code></dt>
  134. <dt><code>--archive-header</code></dt>
  135. <dd><a name="index-archive-headers"></a>
  136. <p>If any of the <var>objfile</var> files are archives, display the archive
  137. header information (in a format similar to &lsquo;<samp>ls -l</samp>&rsquo;). Besides the
  138. information you could list with &lsquo;<samp>ar tv</samp>&rsquo;, &lsquo;<samp>objdump -a</samp>&rsquo; shows
  139. the object file format of each archive member.
  140. </p>
  141. </dd>
  142. <dt><code>--adjust-vma=<var>offset</var></code></dt>
  143. <dd><a name="index-section-addresses-in-objdump"></a>
  144. <a name="index-VMA-in-objdump"></a>
  145. <p>When dumping information, first add <var>offset</var> to all the section
  146. addresses. This is useful if the section addresses do not correspond to
  147. the symbol table, which can happen when putting sections at particular
  148. addresses when using a format which can not represent section addresses,
  149. such as a.out.
  150. </p>
  151. </dd>
  152. <dt><code>-b <var>bfdname</var></code></dt>
  153. <dt><code>--target=<var>bfdname</var></code></dt>
  154. <dd><a name="index-object-code-format-1"></a>
  155. <p>Specify that the object-code format for the object files is
  156. <var>bfdname</var>. This option may not be necessary; <var>objdump</var> can
  157. automatically recognize many formats.
  158. </p>
  159. <p>For example,
  160. </p><div class="example">
  161. <pre class="example">objdump -b oasys -m vax -h fu.o
  162. </pre></div>
  163. <p>displays summary information from the section headers (<samp>-h</samp>) of
  164. <samp>fu.o</samp>, which is explicitly identified (<samp>-m</samp>) as a VAX object
  165. file in the format produced by Oasys compilers. You can list the
  166. formats available with the <samp>-i</samp> option.
  167. See <a href="Target-Selection.html#Target-Selection">Target Selection</a>, for more information.
  168. </p>
  169. </dd>
  170. <dt><code>-C</code></dt>
  171. <dt><code>--demangle[=<var>style</var>]</code></dt>
  172. <dd><a name="index-demangling-in-objdump"></a>
  173. <p>Decode (<em>demangle</em>) low-level symbol names into user-level names.
  174. Besides removing any initial underscore prepended by the system, this
  175. makes C++ function names readable. Different compilers have different
  176. mangling styles. The optional demangling style argument can be used to
  177. choose an appropriate demangling style for your compiler. See <a href="c_002b_002bfilt.html#c_002b_002bfilt">c++filt</a>,
  178. for more information on demangling.
  179. </p>
  180. </dd>
  181. <dt><code>--recurse-limit</code></dt>
  182. <dt><code>--no-recurse-limit</code></dt>
  183. <dt><code>--recursion-limit</code></dt>
  184. <dt><code>--no-recursion-limit</code></dt>
  185. <dd><p>Enables or disables a limit on the amount of recursion performed
  186. whilst demangling strings. Since the name mangling formats allow for
  187. an inifinite level of recursion it is possible to create strings whose
  188. decoding will exhaust the amount of stack space available on the host
  189. machine, triggering a memory fault. The limit tries to prevent this
  190. from happening by restricting recursion to 2048 levels of nesting.
  191. </p>
  192. <p>The default is for this limit to be enabled, but disabling it may be
  193. necessary in order to demangle truly complicated names. Note however
  194. that if the recursion limit is disabled then stack exhaustion is
  195. possible and any bug reports about such an event will be rejected.
  196. </p>
  197. </dd>
  198. <dt><code>-g</code></dt>
  199. <dt><code>--debugging</code></dt>
  200. <dd><p>Display debugging information. This attempts to parse STABS
  201. debugging format information stored in the file and print it out using
  202. a C like syntax. If no STABS debugging was found this option
  203. falls back on the <samp>-W</samp> option to print any DWARF information in
  204. the file.
  205. </p>
  206. </dd>
  207. <dt><code>-e</code></dt>
  208. <dt><code>--debugging-tags</code></dt>
  209. <dd><p>Like <samp>-g</samp>, but the information is generated in a format compatible
  210. with ctags tool.
  211. </p>
  212. </dd>
  213. <dt><code>-d</code></dt>
  214. <dt><code>--disassemble</code></dt>
  215. <dt><code>--disassemble=<var>symbol</var></code></dt>
  216. <dd><a name="index-disassembling-object-code"></a>
  217. <a name="index-machine-instructions"></a>
  218. <p>Display the assembler mnemonics for the machine instructions from the
  219. input file. This option only disassembles those sections which are
  220. expected to contain instructions. If the optional <var>symbol</var>
  221. argument is given, then display the assembler mnemonics starting at
  222. <var>symbol</var>. If <var>symbol</var> is a function name then disassembly
  223. will stop at the end of the function, otherwise it will stop when the
  224. next symbol is encountered. If there are no matches for <var>symbol</var>
  225. then nothing will be displayed.
  226. </p>
  227. <p>Note if the <samp>--dwarf=follow-links</samp> option has also been enabled
  228. then any symbol tables in linked debug info files will be read in and
  229. used when disassembling.
  230. </p>
  231. </dd>
  232. <dt><code>-D</code></dt>
  233. <dt><code>--disassemble-all</code></dt>
  234. <dd><p>Like <samp>-d</samp>, but disassemble the contents of all sections, not just
  235. those expected to contain instructions.
  236. </p>
  237. <p>This option also has a subtle effect on the disassembly of
  238. instructions in code sections. When option <samp>-d</samp> is in effect
  239. objdump will assume that any symbols present in a code section occur
  240. on the boundary between instructions and it will refuse to disassemble
  241. across such a boundary. When option <samp>-D</samp> is in effect however
  242. this assumption is supressed. This means that it is possible for the
  243. output of <samp>-d</samp> and <samp>-D</samp> to differ if, for example, data
  244. is stored in code sections.
  245. </p>
  246. <p>If the target is an ARM architecture this switch also has the effect
  247. of forcing the disassembler to decode pieces of data found in code
  248. sections as if they were instructions.
  249. </p>
  250. <p>Note if the <samp>--dwarf=follow-links</samp> option has also been enabled
  251. then any symbol tables in linked debug info files will be read in and
  252. used when disassembling.
  253. </p>
  254. </dd>
  255. <dt><code>--no-addresses</code></dt>
  256. <dd><p>When disassembling, don&rsquo;t print addresses on each line or for symbols
  257. and relocation offsets. In combination with <samp>--no-show-raw-insn</samp>
  258. this may be useful for comparing compiler output.
  259. </p>
  260. </dd>
  261. <dt><code>--prefix-addresses</code></dt>
  262. <dd><p>When disassembling, print the complete address on each line. This is
  263. the older disassembly format.
  264. </p>
  265. </dd>
  266. <dt><code>-EB</code></dt>
  267. <dt><code>-EL</code></dt>
  268. <dt><code>--endian={big|little}</code></dt>
  269. <dd><a name="index-endianness"></a>
  270. <a name="index-disassembly-endianness"></a>
  271. <p>Specify the endianness of the object files. This only affects
  272. disassembly. This can be useful when disassembling a file format which
  273. does not describe endianness information, such as S-records.
  274. </p>
  275. </dd>
  276. <dt><code>-f</code></dt>
  277. <dt><code>--file-headers</code></dt>
  278. <dd><a name="index-object-file-header"></a>
  279. <p>Display summary information from the overall header of
  280. each of the <var>objfile</var> files.
  281. </p>
  282. </dd>
  283. <dt><code>-F</code></dt>
  284. <dt><code>--file-offsets</code></dt>
  285. <dd><a name="index-object-file-offsets"></a>
  286. <p>When disassembling sections, whenever a symbol is displayed, also
  287. display the file offset of the region of data that is about to be
  288. dumped. If zeroes are being skipped, then when disassembly resumes,
  289. tell the user how many zeroes were skipped and the file offset of the
  290. location from where the disassembly resumes. When dumping sections,
  291. display the file offset of the location from where the dump starts.
  292. </p>
  293. </dd>
  294. <dt><code>--file-start-context</code></dt>
  295. <dd><a name="index-source-code-context"></a>
  296. <p>Specify that when displaying interlisted source code/disassembly
  297. (assumes <samp>-S</samp>) from a file that has not yet been displayed, extend the
  298. context to the start of the file.
  299. </p>
  300. </dd>
  301. <dt><code>-h</code></dt>
  302. <dt><code>--section-headers</code></dt>
  303. <dt><code>--headers</code></dt>
  304. <dd><a name="index-section-headers"></a>
  305. <p>Display summary information from the section headers of the
  306. object file.
  307. </p>
  308. <p>File segments may be relocated to nonstandard addresses, for example by
  309. using the <samp>-Ttext</samp>, <samp>-Tdata</samp>, or <samp>-Tbss</samp> options to
  310. <code>ld</code>. However, some object file formats, such as a.out, do not
  311. store the starting address of the file segments. In those situations,
  312. although <code>ld</code> relocates the sections correctly, using &lsquo;<samp>objdump
  313. -h</samp>&rsquo; to list the file section headers cannot show the correct addresses.
  314. Instead, it shows the usual addresses, which are implicit for the
  315. target.
  316. </p>
  317. <p>Note, in some cases it is possible for a section to have both the
  318. READONLY and the NOREAD attributes set. In such cases the NOREAD
  319. attribute takes precedence, but <code>objdump</code> will report both
  320. since the exact setting of the flag bits might be important.
  321. </p>
  322. </dd>
  323. <dt><code>-H</code></dt>
  324. <dt><code>--help</code></dt>
  325. <dd><p>Print a summary of the options to <code>objdump</code> and exit.
  326. </p>
  327. </dd>
  328. <dt><code>-i</code></dt>
  329. <dt><code>--info</code></dt>
  330. <dd><a name="index-architectures-available"></a>
  331. <a name="index-object-formats-available"></a>
  332. <p>Display a list showing all architectures and object formats available
  333. for specification with <samp>-b</samp> or <samp>-m</samp>.
  334. </p>
  335. </dd>
  336. <dt><code>-j <var>name</var></code></dt>
  337. <dt><code>--section=<var>name</var></code></dt>
  338. <dd><a name="index-section-information"></a>
  339. <p>Display information only for section <var>name</var>.
  340. </p>
  341. </dd>
  342. <dt><code>-l</code></dt>
  343. <dt><code>--line-numbers</code></dt>
  344. <dd><a name="index-source-filenames-for-object-files"></a>
  345. <p>Label the display (using debugging information) with the filename and
  346. source line numbers corresponding to the object code or relocs shown.
  347. Only useful with <samp>-d</samp>, <samp>-D</samp>, or <samp>-r</samp>.
  348. </p>
  349. </dd>
  350. <dt><code>-m <var>machine</var></code></dt>
  351. <dt><code>--architecture=<var>machine</var></code></dt>
  352. <dd><a name="index-architecture"></a>
  353. <a name="index-disassembly-architecture"></a>
  354. <p>Specify the architecture to use when disassembling object files. This
  355. can be useful when disassembling object files which do not describe
  356. architecture information, such as S-records. You can list the available
  357. architectures with the <samp>-i</samp> option.
  358. </p>
  359. <p>If the target is an ARM architecture then this switch has an
  360. additional effect. It restricts the disassembly to only those
  361. instructions supported by the architecture specified by <var>machine</var>.
  362. If it is necessary to use this switch because the input file does not
  363. contain any architecture information, but it is also desired to
  364. disassemble all the instructions use <samp>-marm</samp>.
  365. </p>
  366. </dd>
  367. <dt><code>-M <var>options</var></code></dt>
  368. <dt><code>--disassembler-options=<var>options</var></code></dt>
  369. <dd><p>Pass target specific information to the disassembler. Only supported on
  370. some targets. If it is necessary to specify more than one
  371. disassembler option then multiple <samp>-M</samp> options can be used or
  372. can be placed together into a comma separated list.
  373. </p>
  374. <p>For ARC, <samp>dsp</samp> controls the printing of DSP instructions,
  375. <samp>spfp</samp> selects the printing of FPX single precision FP
  376. instructions, <samp>dpfp</samp> selects the printing of FPX double
  377. precision FP instructions, <samp>quarkse_em</samp> selects the printing of
  378. special QuarkSE-EM instructions, <samp>fpuda</samp> selects the printing
  379. of double precision assist instructions, <samp>fpus</samp> selects the
  380. printing of FPU single precision FP instructions, while <samp>fpud</samp>
  381. selects the printing of FPU double precision FP instructions.
  382. Additionally, one can choose to have all the immediates printed in
  383. hexadecimal using <samp>hex</samp>. By default, the short immediates are
  384. printed using the decimal representation, while the long immediate
  385. values are printed as hexadecimal.
  386. </p>
  387. <p><samp>cpu=...</samp> allows to enforce a particular ISA when disassembling
  388. instructions, overriding the <samp>-m</samp> value or whatever is in the ELF file.
  389. This might be useful to select ARC EM or HS ISA, because architecture is same
  390. for those and disassembler relies on private ELF header data to decide if code
  391. is for EM or HS. This option might be specified multiple times - only the
  392. latest value will be used. Valid values are same as for the assembler
  393. <samp>-mcpu=...</samp> option.
  394. </p>
  395. <p>If the target is an ARM architecture then this switch can be used to
  396. select which register name set is used during disassembler. Specifying
  397. <samp>-M reg-names-std</samp> (the default) will select the register names as
  398. used in ARM&rsquo;s instruction set documentation, but with register 13 called
  399. &rsquo;sp&rsquo;, register 14 called &rsquo;lr&rsquo; and register 15 called &rsquo;pc&rsquo;. Specifying
  400. <samp>-M reg-names-apcs</samp> will select the name set used by the ARM
  401. Procedure Call Standard, whilst specifying <samp>-M reg-names-raw</samp> will
  402. just use &lsquo;<samp>r</samp>&rsquo; followed by the register number.
  403. </p>
  404. <p>There are also two variants on the APCS register naming scheme enabled
  405. by <samp>-M reg-names-atpcs</samp> and <samp>-M reg-names-special-atpcs</samp> which
  406. use the ARM/Thumb Procedure Call Standard naming conventions. (Either
  407. with the normal register names or the special register names).
  408. </p>
  409. <p>This option can also be used for ARM architectures to force the
  410. disassembler to interpret all instructions as Thumb instructions by
  411. using the switch <samp>--disassembler-options=force-thumb</samp>. This can be
  412. useful when attempting to disassemble thumb code produced by other
  413. compilers.
  414. </p>
  415. <p>For AArch64 targets this switch can be used to set whether instructions are
  416. disassembled as the most general instruction using the <samp>-M no-aliases</samp>
  417. option or whether instruction notes should be generated as comments in the
  418. disasssembly using <samp>-M notes</samp>.
  419. </p>
  420. <p>For the x86, some of the options duplicate functions of the <samp>-m</samp>
  421. switch, but allow finer grained control.
  422. </p><dl compact="compact">
  423. <dt><code>x86-64</code></dt>
  424. <dt><code>i386</code></dt>
  425. <dt><code>i8086</code></dt>
  426. <dd><p>Select disassembly for the given architecture.
  427. </p>
  428. </dd>
  429. <dt><code>intel</code></dt>
  430. <dt><code>att</code></dt>
  431. <dd><p>Select between intel syntax mode and AT&amp;T syntax mode.
  432. </p>
  433. </dd>
  434. <dt><code>amd64</code></dt>
  435. <dt><code>intel64</code></dt>
  436. <dd><p>Select between AMD64 ISA and Intel64 ISA.
  437. </p>
  438. </dd>
  439. <dt><code>intel-mnemonic</code></dt>
  440. <dt><code>att-mnemonic</code></dt>
  441. <dd><p>Select between intel mnemonic mode and AT&amp;T mnemonic mode.
  442. Note: <code>intel-mnemonic</code> implies <code>intel</code> and
  443. <code>att-mnemonic</code> implies <code>att</code>.
  444. </p>
  445. </dd>
  446. <dt><code>addr64</code></dt>
  447. <dt><code>addr32</code></dt>
  448. <dt><code>addr16</code></dt>
  449. <dt><code>data32</code></dt>
  450. <dt><code>data16</code></dt>
  451. <dd><p>Specify the default address size and operand size. These five options
  452. will be overridden if <code>x86-64</code>, <code>i386</code> or <code>i8086</code>
  453. appear later in the option string.
  454. </p>
  455. </dd>
  456. <dt><code>suffix</code></dt>
  457. <dd><p>When in AT&amp;T mode and also for a limited set of instructions when in Intel
  458. mode, instructs the disassembler to print a mnemonic suffix even when the
  459. suffix could be inferred by the operands or, for certain instructions, the
  460. execution mode&rsquo;s defaults.
  461. </p></dd>
  462. </dl>
  463. <p>For PowerPC, the <samp>-M</samp> argument <samp>raw</samp> selects
  464. disasssembly of hardware insns rather than aliases. For example, you
  465. will see <code>rlwinm</code> rather than <code>clrlwi</code>, and <code>addi</code>
  466. rather than <code>li</code>. All of the <samp>-m</samp> arguments for
  467. <code>gas</code> that select a CPU are supported. These are:
  468. <samp>403</samp>, <samp>405</samp>, <samp>440</samp>, <samp>464</samp>, <samp>476</samp>,
  469. <samp>601</samp>, <samp>603</samp>, <samp>604</samp>, <samp>620</samp>, <samp>7400</samp>,
  470. <samp>7410</samp>, <samp>7450</samp>, <samp>7455</samp>, <samp>750cl</samp>,
  471. <samp>821</samp>, <samp>850</samp>, <samp>860</samp>, <samp>a2</samp>, <samp>booke</samp>,
  472. <samp>booke32</samp>, <samp>cell</samp>, <samp>com</samp>, <samp>e200z4</samp>,
  473. <samp>e300</samp>, <samp>e500</samp>, <samp>e500mc</samp>, <samp>e500mc64</samp>,
  474. <samp>e500x2</samp>, <samp>e5500</samp>, <samp>e6500</samp>, <samp>efs</samp>,
  475. <samp>power4</samp>, <samp>power5</samp>, <samp>power6</samp>, <samp>power7</samp>,
  476. <samp>power8</samp>, <samp>power9</samp>, <samp>power10</samp>, <samp>ppc</samp>,
  477. <samp>ppc32</samp>, <samp>ppc64</samp>, <samp>ppc64bridge</samp>, <samp>ppcps</samp>,
  478. <samp>pwr</samp>, <samp>pwr2</samp>, <samp>pwr4</samp>, <samp>pwr5</samp>, <samp>pwr5x</samp>,
  479. <samp>pwr6</samp>, <samp>pwr7</samp>, <samp>pwr8</samp>, <samp>pwr9</samp>, <samp>pwr10</samp>,
  480. <samp>pwrx</samp>, <samp>titan</samp>, and <samp>vle</samp>.
  481. <samp>32</samp> and <samp>64</samp> modify the default or a prior CPU
  482. selection, disabling and enabling 64-bit insns respectively. In
  483. addition, <samp>altivec</samp>, <samp>any</samp>, <samp>htm</samp>, <samp>vsx</samp>,
  484. and <samp>spe</samp> add capabilities to a previous <em>or later</em> CPU
  485. selection. <samp>any</samp> will disassemble any opcode known to
  486. binutils, but in cases where an opcode has two different meanings or
  487. different arguments, you may not see the disassembly you expect.
  488. If you disassemble without giving a CPU selection, a default will be
  489. chosen from information gleaned by BFD from the object files headers,
  490. but the result again may not be as you expect.
  491. </p>
  492. <p>For MIPS, this option controls the printing of instruction mnemonic
  493. names and register names in disassembled instructions. Multiple
  494. selections from the following may be specified as a comma separated
  495. string, and invalid options are ignored:
  496. </p>
  497. <dl compact="compact">
  498. <dt><code>no-aliases</code></dt>
  499. <dd><p>Print the &rsquo;raw&rsquo; instruction mnemonic instead of some pseudo
  500. instruction mnemonic. I.e., print &rsquo;daddu&rsquo; or &rsquo;or&rsquo; instead of &rsquo;move&rsquo;,
  501. &rsquo;sll&rsquo; instead of &rsquo;nop&rsquo;, etc.
  502. </p>
  503. </dd>
  504. <dt><code>msa</code></dt>
  505. <dd><p>Disassemble MSA instructions.
  506. </p>
  507. </dd>
  508. <dt><code>virt</code></dt>
  509. <dd><p>Disassemble the virtualization ASE instructions.
  510. </p>
  511. </dd>
  512. <dt><code>xpa</code></dt>
  513. <dd><p>Disassemble the eXtended Physical Address (XPA) ASE instructions.
  514. </p>
  515. </dd>
  516. <dt><code>gpr-names=<var>ABI</var></code></dt>
  517. <dd><p>Print GPR (general-purpose register) names as appropriate
  518. for the specified ABI. By default, GPR names are selected according to
  519. the ABI of the binary being disassembled.
  520. </p>
  521. </dd>
  522. <dt><code>fpr-names=<var>ABI</var></code></dt>
  523. <dd><p>Print FPR (floating-point register) names as
  524. appropriate for the specified ABI. By default, FPR numbers are printed
  525. rather than names.
  526. </p>
  527. </dd>
  528. <dt><code>cp0-names=<var>ARCH</var></code></dt>
  529. <dd><p>Print CP0 (system control coprocessor; coprocessor 0) register names
  530. as appropriate for the CPU or architecture specified by
  531. <var>ARCH</var>. By default, CP0 register names are selected according to
  532. the architecture and CPU of the binary being disassembled.
  533. </p>
  534. </dd>
  535. <dt><code>hwr-names=<var>ARCH</var></code></dt>
  536. <dd><p>Print HWR (hardware register, used by the <code>rdhwr</code> instruction) names
  537. as appropriate for the CPU or architecture specified by
  538. <var>ARCH</var>. By default, HWR names are selected according to
  539. the architecture and CPU of the binary being disassembled.
  540. </p>
  541. </dd>
  542. <dt><code>reg-names=<var>ABI</var></code></dt>
  543. <dd><p>Print GPR and FPR names as appropriate for the selected ABI.
  544. </p>
  545. </dd>
  546. <dt><code>reg-names=<var>ARCH</var></code></dt>
  547. <dd><p>Print CPU-specific register names (CP0 register and HWR names)
  548. as appropriate for the selected CPU or architecture.
  549. </p></dd>
  550. </dl>
  551. <p>For any of the options listed above, <var>ABI</var> or
  552. <var>ARCH</var> may be specified as &lsquo;<samp>numeric</samp>&rsquo; to have numbers printed
  553. rather than names, for the selected types of registers.
  554. You can list the available values of <var>ABI</var> and <var>ARCH</var> using
  555. the <samp>--help</samp> option.
  556. </p>
  557. <p>For VAX, you can specify function entry addresses with <samp>-M
  558. entry:0xf00ba</samp>. You can use this multiple times to properly
  559. disassemble VAX binary files that don&rsquo;t contain symbol tables (like
  560. ROM dumps). In these cases, the function entry mask would otherwise
  561. be decoded as VAX instructions, which would probably lead the rest
  562. of the function being wrongly disassembled.
  563. </p>
  564. </dd>
  565. <dt><code>-p</code></dt>
  566. <dt><code>--private-headers</code></dt>
  567. <dd><p>Print information that is specific to the object file format. The exact
  568. information printed depends upon the object file format. For some
  569. object file formats, no additional information is printed.
  570. </p>
  571. </dd>
  572. <dt><code>-P <var>options</var></code></dt>
  573. <dt><code>--private=<var>options</var></code></dt>
  574. <dd><p>Print information that is specific to the object file format. The
  575. argument <var>options</var> is a comma separated list that depends on the
  576. format (the lists of options is displayed with the help).
  577. </p>
  578. <p>For XCOFF, the available options are:
  579. </p><dl compact="compact">
  580. <dt><code>header</code></dt>
  581. <dt><code>aout</code></dt>
  582. <dt><code>sections</code></dt>
  583. <dt><code>syms</code></dt>
  584. <dt><code>relocs</code></dt>
  585. <dt><code>lineno,</code></dt>
  586. <dt><code>loader</code></dt>
  587. <dt><code>except</code></dt>
  588. <dt><code>typchk</code></dt>
  589. <dt><code>traceback</code></dt>
  590. <dt><code>toc</code></dt>
  591. <dt><code>ldinfo</code></dt>
  592. </dl>
  593. <p>Not all object formats support this option. In particular the ELF
  594. format does not use it.
  595. </p>
  596. </dd>
  597. <dt><code>-r</code></dt>
  598. <dt><code>--reloc</code></dt>
  599. <dd><a name="index-relocation-entries_002c-in-object-file"></a>
  600. <p>Print the relocation entries of the file. If used with <samp>-d</samp> or
  601. <samp>-D</samp>, the relocations are printed interspersed with the
  602. disassembly.
  603. </p>
  604. </dd>
  605. <dt><code>-R</code></dt>
  606. <dt><code>--dynamic-reloc</code></dt>
  607. <dd><a name="index-dynamic-relocation-entries_002c-in-object-file"></a>
  608. <p>Print the dynamic relocation entries of the file. This is only
  609. meaningful for dynamic objects, such as certain types of shared
  610. libraries. As for <samp>-r</samp>, if used with <samp>-d</samp> or
  611. <samp>-D</samp>, the relocations are printed interspersed with the
  612. disassembly.
  613. </p>
  614. </dd>
  615. <dt><code>-s</code></dt>
  616. <dt><code>--full-contents</code></dt>
  617. <dd><a name="index-sections_002c-full-contents"></a>
  618. <a name="index-object-file-sections"></a>
  619. <p>Display the full contents of any sections requested. By default all
  620. non-empty sections are displayed.
  621. </p>
  622. </dd>
  623. <dt><code>-S</code></dt>
  624. <dt><code>--source</code></dt>
  625. <dd><a name="index-source-disassembly"></a>
  626. <a name="index-disassembly_002c-with-source"></a>
  627. <p>Display source code intermixed with disassembly, if possible. Implies
  628. <samp>-d</samp>.
  629. </p>
  630. </dd>
  631. <dt><code>--source-comment[=<var>txt</var>]</code></dt>
  632. <dd><a name="index-source-disassembly-1"></a>
  633. <a name="index-disassembly_002c-with-source-1"></a>
  634. <p>Like the <samp>-S</samp> option, but all source code lines are displayed
  635. with a prefix of <var>txt</var>. Typically <var>txt</var> will be a comment
  636. string which can be used to distinguish the assembler code from the
  637. source code. If <var>txt</var> is not provided then a default string of
  638. <var>&ldquo;# &ldquo;</var> (hash followed by a space), will be used.
  639. </p>
  640. </dd>
  641. <dt><code>--prefix=<var>prefix</var></code></dt>
  642. <dd><a name="index-Add-prefix-to-absolute-paths"></a>
  643. <p>Specify <var>prefix</var> to add to the absolute paths when used with
  644. <samp>-S</samp>.
  645. </p>
  646. </dd>
  647. <dt><code>--prefix-strip=<var>level</var></code></dt>
  648. <dd><a name="index-Strip-absolute-paths"></a>
  649. <p>Indicate how many initial directory names to strip off the hardwired
  650. absolute paths. It has no effect without <samp>--prefix=</samp><var>prefix</var>.
  651. </p>
  652. </dd>
  653. <dt><code>--show-raw-insn</code></dt>
  654. <dd><p>When disassembling instructions, print the instruction in hex as well as
  655. in symbolic form. This is the default except when
  656. <samp>--prefix-addresses</samp> is used.
  657. </p>
  658. </dd>
  659. <dt><code>--no-show-raw-insn</code></dt>
  660. <dd><p>When disassembling instructions, do not print the instruction bytes.
  661. This is the default when <samp>--prefix-addresses</samp> is used.
  662. </p>
  663. </dd>
  664. <dt><code>--insn-width=<var>width</var></code></dt>
  665. <dd><a name="index-Instruction-width"></a>
  666. <p>Display <var>width</var> bytes on a single line when disassembling
  667. instructions.
  668. </p>
  669. </dd>
  670. <dt><code>--visualize-jumps[=color|=extended-color|=off]</code></dt>
  671. <dd><p>Visualize jumps that stay inside a function by drawing ASCII art between
  672. the start and target addresses. The optional <samp>=color</samp> argument
  673. adds color to the output using simple terminal colors. Alternatively
  674. the <samp>=extended-color</samp> argument will add color using 8bit
  675. colors, but these might not work on all terminals.
  676. </p>
  677. <p>If it is necessary to disable the <samp>visualize-jumps</samp> option
  678. after it has previously been enabled then use
  679. <samp>visualize-jumps=off</samp>.
  680. </p>
  681. </dd>
  682. <dt><code>-W[lLiaprmfFsoORtUuTgAckK]</code></dt>
  683. <dt><code>--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]</code></dt>
  684. <dd>
  685. <p>Displays the contents of the DWARF debug sections in the file, if any
  686. are present. Compressed debug sections are automatically decompressed
  687. (temporarily) before they are displayed. If one or more of the
  688. optional letters or words follows the switch then only those type(s)
  689. of data will be dumped. The letters and words refer to the following
  690. information:
  691. </p>
  692. <dl compact="compact">
  693. <dt><code>a</code></dt>
  694. <dt><code>=abbrev</code></dt>
  695. <dd><p>Displays the contents of the &lsquo;<samp>.debug_abbrev</samp>&rsquo; section.
  696. </p>
  697. </dd>
  698. <dt><code>A</code></dt>
  699. <dt><code>=addr</code></dt>
  700. <dd><p>Displays the contents of the &lsquo;<samp>.debug_addr</samp>&rsquo; section.
  701. </p>
  702. </dd>
  703. <dt><code>c</code></dt>
  704. <dt><code>=cu_index</code></dt>
  705. <dd><p>Displays the contents of the &lsquo;<samp>.debug_cu_index</samp>&rsquo; and/or
  706. &lsquo;<samp>.debug_tu_index</samp>&rsquo; sections.
  707. </p>
  708. </dd>
  709. <dt><code>f</code></dt>
  710. <dt><code>=frames</code></dt>
  711. <dd><p>Display the raw contents of a &lsquo;<samp>.debug_frame</samp>&rsquo; section.
  712. </p>
  713. </dd>
  714. <dt><code>F</code></dt>
  715. <dt><code>=frame-interp</code></dt>
  716. <dd><p>Display the interpreted contents of a &lsquo;<samp>.debug_frame</samp>&rsquo; section.
  717. </p>
  718. </dd>
  719. <dt><code>g</code></dt>
  720. <dt><code>=gdb_index</code></dt>
  721. <dd><p>Displays the contents of the &lsquo;<samp>.gdb_index</samp>&rsquo; and/or
  722. &lsquo;<samp>.debug_names</samp>&rsquo; sections.
  723. </p>
  724. </dd>
  725. <dt><code>i</code></dt>
  726. <dt><code>=info</code></dt>
  727. <dd><p>Displays the contents of the &lsquo;<samp>.debug_info</samp>&rsquo; section. Note: the
  728. output from this option can also be restricted by the use of the
  729. <samp>--dwarf-depth</samp> and <samp>--dwarf-start</samp> options.
  730. </p>
  731. </dd>
  732. <dt><code>k</code></dt>
  733. <dt><code>=links</code></dt>
  734. <dd><p>Displays the contents of the &lsquo;<samp>.gnu_debuglink</samp>&rsquo; and/or
  735. &lsquo;<samp>.gnu_debugaltlink</samp>&rsquo; sections. Also displays any links to
  736. separate dwarf object files (dwo), if they are specified by the
  737. DW_AT_GNU_dwo_name or DW_AT_dwo_name attributes in the
  738. &lsquo;<samp>.debug_info</samp>&rsquo; section.
  739. </p>
  740. </dd>
  741. <dt><code>K</code></dt>
  742. <dt><code>=follow-links</code></dt>
  743. <dd><p>Display the contents of any selected debug sections that are found in
  744. linked, separate debug info file(s). This can result in multiple
  745. versions of the same debug section being displayed if it exists in
  746. more than one file.
  747. </p>
  748. <p>In addition, when displaying DWARF attributes, if a form is found that
  749. references the separate debug info file, then the referenced contents
  750. will also be displayed.
  751. </p>
  752. </dd>
  753. <dt><code>l</code></dt>
  754. <dt><code>=rawline</code></dt>
  755. <dd><p>Displays the contents of the &lsquo;<samp>.debug_line</samp>&rsquo; section in a raw
  756. format.
  757. </p>
  758. </dd>
  759. <dt><code>L</code></dt>
  760. <dt><code>=decodedline</code></dt>
  761. <dd><p>Displays the interpreted contents of the &lsquo;<samp>.debug_line</samp>&rsquo; section.
  762. </p>
  763. </dd>
  764. <dt><code>m</code></dt>
  765. <dt><code>=macro</code></dt>
  766. <dd><p>Displays the contents of the &lsquo;<samp>.debug_macro</samp>&rsquo; and/or
  767. &lsquo;<samp>.debug_macinfo</samp>&rsquo; sections.
  768. </p>
  769. </dd>
  770. <dt><code>o</code></dt>
  771. <dt><code>=loc</code></dt>
  772. <dd><p>Displays the contents of the &lsquo;<samp>.debug_loc</samp>&rsquo; and/or
  773. &lsquo;<samp>.debug_loclists</samp>&rsquo; sections.
  774. </p>
  775. </dd>
  776. <dt><code>O</code></dt>
  777. <dt><code>=str-offsets</code></dt>
  778. <dd><p>Displays the contents of the &lsquo;<samp>.debug_str_offsets</samp>&rsquo; section.
  779. </p>
  780. </dd>
  781. <dt><code>p</code></dt>
  782. <dt><code>=pubnames</code></dt>
  783. <dd><p>Displays the contents of the &lsquo;<samp>.debug_pubnames</samp>&rsquo; and/or
  784. &lsquo;<samp>.debug_gnu_pubnames</samp>&rsquo; sections.
  785. </p>
  786. </dd>
  787. <dt><code>r</code></dt>
  788. <dt><code>=aranges</code></dt>
  789. <dd><p>Displays the contents of the &lsquo;<samp>.debug_aranges</samp>&rsquo; section.
  790. </p>
  791. </dd>
  792. <dt><code>R</code></dt>
  793. <dt><code>=Ranges</code></dt>
  794. <dd><p>Displays the contents of the &lsquo;<samp>.debug_ranges</samp>&rsquo; and/or
  795. &lsquo;<samp>.debug_rnglists</samp>&rsquo; sections.
  796. </p>
  797. </dd>
  798. <dt><code>s</code></dt>
  799. <dt><code>=str</code></dt>
  800. <dd><p>Displays the contents of the &lsquo;<samp>.debug_str</samp>&rsquo;, &lsquo;<samp>.debug_line_str</samp>&rsquo;
  801. and/or &lsquo;<samp>.debug_str_offsets</samp>&rsquo; sections.
  802. </p>
  803. </dd>
  804. <dt><code>t</code></dt>
  805. <dt><code>=pubtype</code></dt>
  806. <dd><p>Displays the contents of the &lsquo;<samp>.debug_pubtypes</samp>&rsquo; and/or
  807. &lsquo;<samp>.debug_gnu_pubtypes</samp>&rsquo; sections.
  808. </p>
  809. </dd>
  810. <dt><code>T</code></dt>
  811. <dt><code>=trace_aranges</code></dt>
  812. <dd><p>Displays the contents of the &lsquo;<samp>.trace_aranges</samp>&rsquo; section.
  813. </p>
  814. </dd>
  815. <dt><code>u</code></dt>
  816. <dt><code>=trace_abbrev</code></dt>
  817. <dd><p>Displays the contents of the &lsquo;<samp>.trace_abbrev</samp>&rsquo; section.
  818. </p>
  819. </dd>
  820. <dt><code>U</code></dt>
  821. <dt><code>=trace_info</code></dt>
  822. <dd><p>Displays the contents of the &lsquo;<samp>.trace_info</samp>&rsquo; section.
  823. </p>
  824. </dd>
  825. </dl>
  826. <p>Note: displaying the contents of &lsquo;<samp>.debug_static_funcs</samp>&rsquo;,
  827. &lsquo;<samp>.debug_static_vars</samp>&rsquo; and &lsquo;<samp>debug_weaknames</samp>&rsquo; sections is not
  828. currently supported.
  829. </p>
  830. </dd>
  831. <dt><code>--dwarf-depth=<var>n</var></code></dt>
  832. <dd><p>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children.
  833. This is only useful with <samp>--debug-dump=info</samp>. The default is
  834. to print all DIEs; the special value 0 for <var>n</var> will also have this
  835. effect.
  836. </p>
  837. <p>With a non-zero value for <var>n</var>, DIEs at or deeper than <var>n</var>
  838. levels will not be printed. The range for <var>n</var> is zero-based.
  839. </p>
  840. </dd>
  841. <dt><code>--dwarf-start=<var>n</var></code></dt>
  842. <dd><p>Print only DIEs beginning with the DIE numbered <var>n</var>. This is only
  843. useful with <samp>--debug-dump=info</samp>.
  844. </p>
  845. <p>If specified, this option will suppress printing of any header
  846. information and all DIEs before the DIE numbered <var>n</var>. Only
  847. siblings and children of the specified DIE will be printed.
  848. </p>
  849. <p>This can be used in conjunction with <samp>--dwarf-depth</samp>.
  850. </p>
  851. </dd>
  852. <dt><code>--dwarf-check</code></dt>
  853. <dd><p>Enable additional checks for consistency of Dwarf information.
  854. </p>
  855. </dd>
  856. <dt><code>--ctf=<var>section</var></code></dt>
  857. <dd><a name="index-CTF"></a>
  858. <a name="index-Compact-Type-Format"></a>
  859. <p>Display the contents of the specified CTF section. CTF sections themselves
  860. contain many subsections, all of which are displayed in order.
  861. </p>
  862. </dd>
  863. <dt><code>--ctf-parent=<var>section</var></code></dt>
  864. <dd>
  865. <p>Specify the name of another section from which the CTF dictionary can inherit
  866. types. (If none is specified, we assume the CTF dictionary inherits types
  867. from the default-named member of the archive contained within this section.)
  868. </p>
  869. </dd>
  870. <dt><code>-G</code></dt>
  871. <dt><code>--stabs</code></dt>
  872. <dd><a name="index-stab"></a>
  873. <a name="index-_002estab"></a>
  874. <a name="index-debug-symbols"></a>
  875. <a name="index-ELF-object-file-format"></a>
  876. <p>Display the full contents of any sections requested. Display the
  877. contents of the .stab and .stab.index and .stab.excl sections from an
  878. ELF file. This is only useful on systems (such as Solaris 2.0) in which
  879. <code>.stab</code> debugging symbol-table entries are carried in an ELF
  880. section. In most other file formats, debugging symbol-table entries are
  881. interleaved with linkage symbols, and are visible in the <samp>--syms</samp>
  882. output.
  883. </p>
  884. </dd>
  885. <dt><code>--start-address=<var>address</var></code></dt>
  886. <dd><a name="index-start_002daddress"></a>
  887. <p>Start displaying data at the specified address. This affects the output
  888. of the <samp>-d</samp>, <samp>-r</samp> and <samp>-s</samp> options.
  889. </p>
  890. </dd>
  891. <dt><code>--stop-address=<var>address</var></code></dt>
  892. <dd><a name="index-stop_002daddress"></a>
  893. <p>Stop displaying data at the specified address. This affects the output
  894. of the <samp>-d</samp>, <samp>-r</samp> and <samp>-s</samp> options.
  895. </p>
  896. </dd>
  897. <dt><code>-t</code></dt>
  898. <dt><code>--syms</code></dt>
  899. <dd><a name="index-symbol-table-entries_002c-printing"></a>
  900. <p>Print the symbol table entries of the file.
  901. This is similar to the information provided by the &lsquo;<samp>nm</samp>&rsquo; program,
  902. although the display format is different. The format of the output
  903. depends upon the format of the file being dumped, but there are two main
  904. types. One looks like this:
  905. </p>
  906. <div class="smallexample">
  907. <pre class="smallexample">[ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss
  908. [ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred
  909. </pre></div>
  910. <p>where the number inside the square brackets is the number of the entry
  911. in the symbol table, the <var>sec</var> number is the section number, the
  912. <var>fl</var> value are the symbol&rsquo;s flag bits, the <var>ty</var> number is the
  913. symbol&rsquo;s type, the <var>scl</var> number is the symbol&rsquo;s storage class and
  914. the <var>nx</var> value is the number of auxilary entries associated with
  915. the symbol. The last two fields are the symbol&rsquo;s value and its name.
  916. </p>
  917. <p>The other common output format, usually seen with ELF based files,
  918. looks like this:
  919. </p>
  920. <div class="smallexample">
  921. <pre class="smallexample">00000000 l d .bss 00000000 .bss
  922. 00000000 g .text 00000000 fred
  923. </pre></div>
  924. <p>Here the first number is the symbol&rsquo;s value (sometimes refered to as
  925. its address). The next field is actually a set of characters and
  926. spaces indicating the flag bits that are set on the symbol. These
  927. characters are described below. Next is the section with which the
  928. symbol is associated or <em>*ABS*</em> if the section is absolute (ie
  929. not connected with any section), or <em>*UND*</em> if the section is
  930. referenced in the file being dumped, but not defined there.
  931. </p>
  932. <p>After the section name comes another field, a number, which for common
  933. symbols is the alignment and for other symbol is the size. Finally
  934. the symbol&rsquo;s name is displayed.
  935. </p>
  936. <p>The flag characters are divided into 7 groups as follows:
  937. </p><dl compact="compact">
  938. <dt><code>l</code></dt>
  939. <dt><code>g</code></dt>
  940. <dt><code>u</code></dt>
  941. <dt><code>!</code></dt>
  942. <dd><p>The symbol is a local (l), global (g), unique global (u), neither
  943. global nor local (a space) or both global and local (!). A
  944. symbol can be neither local or global for a variety of reasons, e.g.,
  945. because it is used for debugging, but it is probably an indication of
  946. a bug if it is ever both local and global. Unique global symbols are
  947. a GNU extension to the standard set of ELF symbol bindings. For such
  948. a symbol the dynamic linker will make sure that in the entire process
  949. there is just one symbol with this name and type in use.
  950. </p>
  951. </dd>
  952. <dt><code>w</code></dt>
  953. <dd><p>The symbol is weak (w) or strong (a space).
  954. </p>
  955. </dd>
  956. <dt><code>C</code></dt>
  957. <dd><p>The symbol denotes a constructor (C) or an ordinary symbol (a space).
  958. </p>
  959. </dd>
  960. <dt><code>W</code></dt>
  961. <dd><p>The symbol is a warning (W) or a normal symbol (a space). A warning
  962. symbol&rsquo;s name is a message to be displayed if the symbol following the
  963. warning symbol is ever referenced.
  964. </p>
  965. </dd>
  966. <dt><code>I</code></dt>
  967. <dt><code>i</code></dt>
  968. <dd><p>The symbol is an indirect reference to another symbol (I), a function
  969. to be evaluated during reloc processing (i) or a normal symbol (a
  970. space).
  971. </p>
  972. </dd>
  973. <dt><code>d</code></dt>
  974. <dt><code>D</code></dt>
  975. <dd><p>The symbol is a debugging symbol (d) or a dynamic symbol (D) or a
  976. normal symbol (a space).
  977. </p>
  978. </dd>
  979. <dt><code>F</code></dt>
  980. <dt><code>f</code></dt>
  981. <dt><code>O</code></dt>
  982. <dd><p>The symbol is the name of a function (F) or a file (f) or an object
  983. (O) or just a normal symbol (a space).
  984. </p></dd>
  985. </dl>
  986. </dd>
  987. <dt><code>-T</code></dt>
  988. <dt><code>--dynamic-syms</code></dt>
  989. <dd><a name="index-dynamic-symbol-table-entries_002c-printing"></a>
  990. <p>Print the dynamic symbol table entries of the file. This is only
  991. meaningful for dynamic objects, such as certain types of shared
  992. libraries. This is similar to the information provided by the &lsquo;<samp>nm</samp>&rsquo;
  993. program when given the <samp>-D</samp> (<samp>--dynamic</samp>) option.
  994. </p>
  995. <p>The output format is similar to that produced by the <samp>--syms</samp>
  996. option, except that an extra field is inserted before the symbol&rsquo;s
  997. name, giving the version information associated with the symbol.
  998. If the version is the default version to be used when resolving
  999. unversioned references to the symbol then it&rsquo;s displayed as is,
  1000. otherwise it&rsquo;s put into parentheses.
  1001. </p>
  1002. </dd>
  1003. <dt><code>--special-syms</code></dt>
  1004. <dd><p>When displaying symbols include those which the target considers to be
  1005. special in some way and which would not normally be of interest to the
  1006. user.
  1007. </p>
  1008. </dd>
  1009. <dt><code>-V</code></dt>
  1010. <dt><code>--version</code></dt>
  1011. <dd><p>Print the version number of <code>objdump</code> and exit.
  1012. </p>
  1013. </dd>
  1014. <dt><code>-x</code></dt>
  1015. <dt><code>--all-headers</code></dt>
  1016. <dd><a name="index-all-header-information_002c-object-file"></a>
  1017. <a name="index-header-information_002c-all"></a>
  1018. <p>Display all available header information, including the symbol table and
  1019. relocation entries. Using <samp>-x</samp> is equivalent to specifying all of
  1020. <samp>-a -f -h -p -r -t</samp>.
  1021. </p>
  1022. </dd>
  1023. <dt><code>-w</code></dt>
  1024. <dt><code>--wide</code></dt>
  1025. <dd><a name="index-wide-output_002c-printing"></a>
  1026. <p>Format some lines for output devices that have more than 80 columns.
  1027. Also do not truncate symbol names when they are displayed.
  1028. </p>
  1029. </dd>
  1030. <dt><code>-z</code></dt>
  1031. <dt><code>--disassemble-zeroes</code></dt>
  1032. <dd><p>Normally the disassembly output will skip blocks of zeroes. This
  1033. option directs the disassembler to disassemble those blocks, just like
  1034. any other data.
  1035. </p></dd>
  1036. </dl>
  1037. <hr>
  1038. <div class="header">
  1039. <p>
  1040. 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> &nbsp; [<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>
  1041. </div>
  1042. </body>
  1043. </html>