objdump.html 45 KB

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