readelf.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  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-2021 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>readelf (GNU Binary Utilities)</title>
  15. <meta name="description" content="readelf (GNU Binary Utilities)">
  16. <meta name="keywords" content="readelf (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="elfedit.html#elfedit" rel="next" title="elfedit">
  25. <link href="def-file-format.html#def-file-format" rel="prev" title="def file format">
  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="readelf"></a>
  56. <div class="header">
  57. <p>
  58. Next: <a href="elfedit.html#elfedit" accesskey="n" rel="next">elfedit</a>, Previous: <a href="dlltool.html#dlltool" accesskey="p" rel="prev">dlltool</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="readelf-1"></a>
  62. <h2 class="chapter">14 readelf</h2>
  63. <a name="index-ELF-file-information"></a>
  64. <a name="index-readelf"></a>
  65. <div class="smallexample">
  66. <pre class="smallexample">readelf [<samp>-a</samp>|<samp>--all</samp>]
  67. [<samp>-h</samp>|<samp>--file-header</samp>]
  68. [<samp>-l</samp>|<samp>--program-headers</samp>|<samp>--segments</samp>]
  69. [<samp>-S</samp>|<samp>--section-headers</samp>|<samp>--sections</samp>]
  70. [<samp>-g</samp>|<samp>--section-groups</samp>]
  71. [<samp>-t</samp>|<samp>--section-details</samp>]
  72. [<samp>-e</samp>|<samp>--headers</samp>]
  73. [<samp>-s</samp>|<samp>--syms</samp>|<samp>--symbols</samp>]
  74. [<samp>--dyn-syms</samp>|<samp>--lto-syms</samp>]
  75. [<samp>--demangle<var>=style</var></samp>|<samp>--no-demangle</samp>]
  76. [<samp>--recurse-limit</samp>|<samp>--no-recurse-limit</samp>]
  77. [<samp>-n</samp>|<samp>--notes</samp>]
  78. [<samp>-r</samp>|<samp>--relocs</samp>]
  79. [<samp>-u</samp>|<samp>--unwind</samp>]
  80. [<samp>-d</samp>|<samp>--dynamic</samp>]
  81. [<samp>-V</samp>|<samp>--version-info</samp>]
  82. [<samp>-A</samp>|<samp>--arch-specific</samp>]
  83. [<samp>-D</samp>|<samp>--use-dynamic</samp>]
  84. [<samp>-L</samp>|<samp>--lint</samp>|<samp>--enable-checks</samp>]
  85. [<samp>-x</samp> &lt;number or name&gt;|<samp>--hex-dump=</samp>&lt;number or name&gt;]
  86. [<samp>-p</samp> &lt;number or name&gt;|<samp>--string-dump=</samp>&lt;number or name&gt;]
  87. [<samp>-R</samp> &lt;number or name&gt;|<samp>--relocated-dump=</samp>&lt;number or name&gt;]
  88. [<samp>-z</samp>|<samp>--decompress</samp>]
  89. [<samp>-c</samp>|<samp>--archive-index</samp>]
  90. [<samp>-w[lLiaprmfFsoORtUuTgAckK]</samp>|
  91. <samp>--debug-dump</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]]
  92. [<samp>--dwarf-depth=<var>n</var></samp>]
  93. [<samp>--dwarf-start=<var>n</var></samp>]
  94. [<samp>--ctf=</samp><var>section</var>]
  95. [<samp>--ctf-parent=</samp><var>section</var>]
  96. [<samp>--ctf-symbols=</samp><var>section</var>]
  97. [<samp>--ctf-strings=</samp><var>section</var>]
  98. [<samp>-I</samp>|<samp>--histogram</samp>]
  99. [<samp>-v</samp>|<samp>--version</samp>]
  100. [<samp>-W</samp>|<samp>--wide</samp>]
  101. [<samp>-T</samp>|<samp>--silent-truncation</samp>]
  102. [<samp>-H</samp>|<samp>--help</samp>]
  103. <var>elffile</var>&hellip;
  104. </pre></div>
  105. <p><code>readelf</code> displays information about one or more ELF format object
  106. files. The options control what particular information to display.
  107. </p>
  108. <p><var>elffile</var>&hellip; are the object files to be examined. 32-bit and
  109. 64-bit ELF files are supported, as are archives containing ELF files.
  110. </p>
  111. <p>This program performs a similar function to <code>objdump</code> but it
  112. goes into more detail and it exists independently of the <small>BFD</small>
  113. library, so if there is a bug in <small>BFD</small> then readelf will not be
  114. affected.
  115. </p>
  116. <p>The long and short forms of options, shown here as alternatives, are
  117. equivalent. At least one option besides &lsquo;<samp>-v</samp>&rsquo; or &lsquo;<samp>-H</samp>&rsquo; must be
  118. given.
  119. </p>
  120. <dl compact="compact">
  121. <dt><code>-a</code></dt>
  122. <dt><code>--all</code></dt>
  123. <dd><p>Equivalent to specifying <samp>--file-header</samp>,
  124. <samp>--program-headers</samp>, <samp>--sections</samp>, <samp>--symbols</samp>,
  125. <samp>--relocs</samp>, <samp>--dynamic</samp>, <samp>--notes</samp>,
  126. <samp>--version-info</samp>, <samp>--arch-specific</samp>, <samp>--unwind</samp>,
  127. <samp>--section-groups</samp> and <samp>--histogram</samp>.
  128. </p>
  129. <p>Note - this option does not enable <samp>--use-dynamic</samp> itself, so
  130. if that option is not present on the command line then dynamic symbols
  131. and dynamic relocs will not be displayed.
  132. </p>
  133. </dd>
  134. <dt><code>-h</code></dt>
  135. <dt><code>--file-header</code></dt>
  136. <dd><a name="index-ELF-file-header-information"></a>
  137. <p>Displays the information contained in the ELF header at the start of the
  138. file.
  139. </p>
  140. </dd>
  141. <dt><code>-l</code></dt>
  142. <dt><code>--program-headers</code></dt>
  143. <dt><code>--segments</code></dt>
  144. <dd><a name="index-ELF-program-header-information"></a>
  145. <a name="index-ELF-segment-information"></a>
  146. <p>Displays the information contained in the file&rsquo;s segment headers, if it
  147. has any.
  148. </p>
  149. </dd>
  150. <dt><code>-S</code></dt>
  151. <dt><code>--sections</code></dt>
  152. <dt><code>--section-headers</code></dt>
  153. <dd><a name="index-ELF-section-information"></a>
  154. <p>Displays the information contained in the file&rsquo;s section headers, if it
  155. has any.
  156. </p>
  157. </dd>
  158. <dt><code>-g</code></dt>
  159. <dt><code>--section-groups</code></dt>
  160. <dd><a name="index-ELF-section-group-information"></a>
  161. <p>Displays the information contained in the file&rsquo;s section groups, if it
  162. has any.
  163. </p>
  164. </dd>
  165. <dt><code>-t</code></dt>
  166. <dt><code>--section-details</code></dt>
  167. <dd><a name="index-ELF-section-information-1"></a>
  168. <p>Displays the detailed section information. Implies <samp>-S</samp>.
  169. </p>
  170. </dd>
  171. <dt><code>-s</code></dt>
  172. <dt><code>--symbols</code></dt>
  173. <dt><code>--syms</code></dt>
  174. <dd><a name="index-ELF-symbol-table-information"></a>
  175. <p>Displays the entries in symbol table section of the file, if it has one.
  176. If a symbol has version information associated with it then this is
  177. displayed as well. The version string is displayed as a suffix to the
  178. symbol name, preceded by an @ character. For example
  179. &lsquo;<samp>foo@VER_1</samp>&rsquo;. If the version is the default version to be used
  180. when resolving unversioned references to the symbol then it is
  181. displayed as a suffix preceded by two @ characters. For example
  182. &lsquo;<samp>foo@@VER_2</samp>&rsquo;.
  183. </p>
  184. </dd>
  185. <dt><code>--dyn-syms</code></dt>
  186. <dd><a name="index-ELF-dynamic-symbol-table-information"></a>
  187. <p>Displays the entries in dynamic symbol table section of the file, if it
  188. has one. The output format is the same as the format used by the
  189. <samp>--syms</samp> option.
  190. </p>
  191. </dd>
  192. <dt><code>--lto-syms</code></dt>
  193. <dd><a name="index-LTO-symbol-table"></a>
  194. <p>Displays the contents of any LTO symbol tables in the file.
  195. </p>
  196. </dd>
  197. <dt><code>-C</code></dt>
  198. <dt><code>--demangle[=<var>style</var>]</code></dt>
  199. <dd><a name="index-demangling-in-nm-1"></a>
  200. <p>Decode (<em>demangle</em>) low-level symbol names into user-level names.
  201. This makes C++ function names readable. Different compilers have
  202. different mangling styles. The optional demangling style argument can
  203. be used to choose an appropriate demangling style for your
  204. compiler. See <a href="c_002b_002bfilt.html#c_002b_002bfilt">c++filt</a>, for more information on demangling.
  205. </p>
  206. </dd>
  207. <dt><code>--no-demangle</code></dt>
  208. <dd><p>Do not demangle low-level symbol names. This is the default.
  209. </p>
  210. </dd>
  211. <dt><code>--recurse-limit</code></dt>
  212. <dt><code>--no-recurse-limit</code></dt>
  213. <dt><code>--recursion-limit</code></dt>
  214. <dt><code>--no-recursion-limit</code></dt>
  215. <dd><p>Enables or disables a limit on the amount of recursion performed
  216. whilst demangling strings. Since the name mangling formats allow for
  217. an infinite level of recursion it is possible to create strings whose
  218. decoding will exhaust the amount of stack space available on the host
  219. machine, triggering a memory fault. The limit tries to prevent this
  220. from happening by restricting recursion to 2048 levels of nesting.
  221. </p>
  222. <p>The default is for this limit to be enabled, but disabling it may be
  223. necessary in order to demangle truly complicated names. Note however
  224. that if the recursion limit is disabled then stack exhaustion is
  225. possible and any bug reports about such an event will be rejected.
  226. </p>
  227. </dd>
  228. <dt><code>-e</code></dt>
  229. <dt><code>--headers</code></dt>
  230. <dd><p>Display all the headers in the file. Equivalent to <samp>-h -l -S</samp>.
  231. </p>
  232. </dd>
  233. <dt><code>-n</code></dt>
  234. <dt><code>--notes</code></dt>
  235. <dd><a name="index-ELF-notes"></a>
  236. <p>Displays the contents of the NOTE segments and/or sections, if any.
  237. </p>
  238. </dd>
  239. <dt><code>-r</code></dt>
  240. <dt><code>--relocs</code></dt>
  241. <dd><a name="index-ELF-reloc-information"></a>
  242. <p>Displays the contents of the file&rsquo;s relocation section, if it has one.
  243. </p>
  244. </dd>
  245. <dt><code>-u</code></dt>
  246. <dt><code>--unwind</code></dt>
  247. <dd><a name="index-unwind-information"></a>
  248. <p>Displays the contents of the file&rsquo;s unwind section, if it has one. Only
  249. the unwind sections for IA64 ELF files, as well as ARM unwind tables
  250. (<code>.ARM.exidx</code> / <code>.ARM.extab</code>) are currently supported. If
  251. support is not yet implemented for your architecture you could try
  252. dumping the contents of the <var>.eh_frames</var> section using the
  253. <samp>--debug-dump=frames</samp> or <samp>--debug-dump=frames-interp</samp>
  254. options.
  255. </p>
  256. </dd>
  257. <dt><code>-d</code></dt>
  258. <dt><code>--dynamic</code></dt>
  259. <dd><a name="index-ELF-dynamic-section-information"></a>
  260. <p>Displays the contents of the file&rsquo;s dynamic section, if it has one.
  261. </p>
  262. </dd>
  263. <dt><code>-V</code></dt>
  264. <dt><code>--version-info</code></dt>
  265. <dd><a name="index-ELF-version-sections-information"></a>
  266. <p>Displays the contents of the version sections in the file, it they
  267. exist.
  268. </p>
  269. </dd>
  270. <dt><code>-A</code></dt>
  271. <dt><code>--arch-specific</code></dt>
  272. <dd><p>Displays architecture-specific information in the file, if there
  273. is any.
  274. </p>
  275. </dd>
  276. <dt><code>-D</code></dt>
  277. <dt><code>--use-dynamic</code></dt>
  278. <dd><p>When displaying symbols, this option makes <code>readelf</code> use the
  279. symbol hash tables in the file&rsquo;s dynamic section, rather than the
  280. symbol table sections.
  281. </p>
  282. <p>When displaying relocations, this option makes <code>readelf</code>
  283. display the dynamic relocations rather than the static relocations.
  284. </p>
  285. </dd>
  286. <dt><code>-L</code></dt>
  287. <dt><code>--lint</code></dt>
  288. <dt><code>--enable-checks</code></dt>
  289. <dd><p>Displays warning messages about possible problems with the file(s)
  290. being examined. If used on its own then all of the contents of the
  291. file(s) will be examined. If used with one of the dumping options
  292. then the warning messages will only be produced for the things being
  293. displayed.
  294. </p>
  295. </dd>
  296. <dt><code>-x &lt;number or name&gt;</code></dt>
  297. <dt><code>--hex-dump=&lt;number or name&gt;</code></dt>
  298. <dd><p>Displays the contents of the indicated section as a hexadecimal bytes.
  299. A number identifies a particular section by index in the section table;
  300. any other string identifies all sections with that name in the object file.
  301. </p>
  302. </dd>
  303. <dt><code>-R &lt;number or name&gt;</code></dt>
  304. <dt><code>--relocated-dump=&lt;number or name&gt;</code></dt>
  305. <dd><p>Displays the contents of the indicated section as a hexadecimal
  306. bytes. A number identifies a particular section by index in the
  307. section table; any other string identifies all sections with that name
  308. in the object file. The contents of the section will be relocated
  309. before they are displayed.
  310. </p>
  311. </dd>
  312. <dt><code>-p &lt;number or name&gt;</code></dt>
  313. <dt><code>--string-dump=&lt;number or name&gt;</code></dt>
  314. <dd><p>Displays the contents of the indicated section as printable strings.
  315. A number identifies a particular section by index in the section table;
  316. any other string identifies all sections with that name in the object file.
  317. </p>
  318. </dd>
  319. <dt><code>-z</code></dt>
  320. <dt><code>--decompress</code></dt>
  321. <dd><p>Requests that the section(s) being dumped by <samp>x</samp>, <samp>R</samp> or
  322. <samp>p</samp> options are decompressed before being displayed. If the
  323. section(s) are not compressed then they are displayed as is.
  324. </p>
  325. </dd>
  326. <dt><code>-c</code></dt>
  327. <dt><code>--archive-index</code></dt>
  328. <dd><a name="index-Archive-file-symbol-index-information"></a>
  329. <p>Displays the file symbol index information contained in the header part
  330. of binary archives. Performs the same function as the <samp>t</samp>
  331. command to <code>ar</code>, but without using the BFD library. See <a href="ar.html#ar">ar</a>.
  332. </p>
  333. </dd>
  334. <dt><code>-w[lLiaprmfFsOoRtUuTgAckK]</code></dt>
  335. <dt><code>--debug-dump[=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>
  336. <dd>
  337. <p>Displays the contents of the DWARF debug sections in the file, if any
  338. are present. Compressed debug sections are automatically decompressed
  339. (temporarily) before they are displayed. If one or more of the
  340. optional letters or words follows the switch then only those type(s)
  341. of data will be dumped. The letters and words refer to the following
  342. information:
  343. </p>
  344. <dl compact="compact">
  345. <dt><code>a</code></dt>
  346. <dt><code>=abbrev</code></dt>
  347. <dd><p>Displays the contents of the &lsquo;<samp>.debug_abbrev</samp>&rsquo; section.
  348. </p>
  349. </dd>
  350. <dt><code>A</code></dt>
  351. <dt><code>=addr</code></dt>
  352. <dd><p>Displays the contents of the &lsquo;<samp>.debug_addr</samp>&rsquo; section.
  353. </p>
  354. </dd>
  355. <dt><code>c</code></dt>
  356. <dt><code>=cu_index</code></dt>
  357. <dd><p>Displays the contents of the &lsquo;<samp>.debug_cu_index</samp>&rsquo; and/or
  358. &lsquo;<samp>.debug_tu_index</samp>&rsquo; sections.
  359. </p>
  360. </dd>
  361. <dt><code>f</code></dt>
  362. <dt><code>=frames</code></dt>
  363. <dd><p>Display the raw contents of a &lsquo;<samp>.debug_frame</samp>&rsquo; section.
  364. </p>
  365. </dd>
  366. <dt><code>F</code></dt>
  367. <dt><code>=frame-interp</code></dt>
  368. <dd><p>Display the interpreted contents of a &lsquo;<samp>.debug_frame</samp>&rsquo; section.
  369. </p>
  370. </dd>
  371. <dt><code>g</code></dt>
  372. <dt><code>=gdb_index</code></dt>
  373. <dd><p>Displays the contents of the &lsquo;<samp>.gdb_index</samp>&rsquo; and/or
  374. &lsquo;<samp>.debug_names</samp>&rsquo; sections.
  375. </p>
  376. </dd>
  377. <dt><code>i</code></dt>
  378. <dt><code>=info</code></dt>
  379. <dd><p>Displays the contents of the &lsquo;<samp>.debug_info</samp>&rsquo; section. Note: the
  380. output from this option can also be restricted by the use of the
  381. <samp>--dwarf-depth</samp> and <samp>--dwarf-start</samp> options.
  382. </p>
  383. </dd>
  384. <dt><code>k</code></dt>
  385. <dt><code>=links</code></dt>
  386. <dd><p>Displays the contents of the &lsquo;<samp>.gnu_debuglink</samp>&rsquo; and/or
  387. &lsquo;<samp>.gnu_debugaltlink</samp>&rsquo; sections. Also displays any links to
  388. separate dwarf object files (dwo), if they are specified by the
  389. DW_AT_GNU_dwo_name or DW_AT_dwo_name attributes in the
  390. &lsquo;<samp>.debug_info</samp>&rsquo; section.
  391. </p>
  392. </dd>
  393. <dt><code>K</code></dt>
  394. <dt><code>=follow-links</code></dt>
  395. <dd><p>Display the contents of any selected debug sections that are found in
  396. linked, separate debug info file(s). This can result in multiple
  397. versions of the same debug section being displayed if it exists in
  398. more than one file.
  399. </p>
  400. <p>In addition, when displaying DWARF attributes, if a form is found that
  401. references the separate debug info file, then the referenced contents
  402. will also be displayed.
  403. </p>
  404. </dd>
  405. <dt><code>l</code></dt>
  406. <dt><code>=rawline</code></dt>
  407. <dd><p>Displays the contents of the &lsquo;<samp>.debug_line</samp>&rsquo; section in a raw
  408. format.
  409. </p>
  410. </dd>
  411. <dt><code>L</code></dt>
  412. <dt><code>=decodedline</code></dt>
  413. <dd><p>Displays the interpreted contents of the &lsquo;<samp>.debug_line</samp>&rsquo; section.
  414. </p>
  415. </dd>
  416. <dt><code>m</code></dt>
  417. <dt><code>=macro</code></dt>
  418. <dd><p>Displays the contents of the &lsquo;<samp>.debug_macro</samp>&rsquo; and/or
  419. &lsquo;<samp>.debug_macinfo</samp>&rsquo; sections.
  420. </p>
  421. </dd>
  422. <dt><code>o</code></dt>
  423. <dt><code>=loc</code></dt>
  424. <dd><p>Displays the contents of the &lsquo;<samp>.debug_loc</samp>&rsquo; and/or
  425. &lsquo;<samp>.debug_loclists</samp>&rsquo; sections.
  426. </p>
  427. </dd>
  428. <dt><code>O</code></dt>
  429. <dt><code>=str-offsets</code></dt>
  430. <dd><p>Displays the contents of the &lsquo;<samp>.debug_str_offsets</samp>&rsquo; section.
  431. </p>
  432. </dd>
  433. <dt><code>p</code></dt>
  434. <dt><code>=pubnames</code></dt>
  435. <dd><p>Displays the contents of the &lsquo;<samp>.debug_pubnames</samp>&rsquo; and/or
  436. &lsquo;<samp>.debug_gnu_pubnames</samp>&rsquo; sections.
  437. </p>
  438. </dd>
  439. <dt><code>r</code></dt>
  440. <dt><code>=aranges</code></dt>
  441. <dd><p>Displays the contents of the &lsquo;<samp>.debug_aranges</samp>&rsquo; section.
  442. </p>
  443. </dd>
  444. <dt><code>R</code></dt>
  445. <dt><code>=Ranges</code></dt>
  446. <dd><p>Displays the contents of the &lsquo;<samp>.debug_ranges</samp>&rsquo; and/or
  447. &lsquo;<samp>.debug_rnglists</samp>&rsquo; sections.
  448. </p>
  449. </dd>
  450. <dt><code>s</code></dt>
  451. <dt><code>=str</code></dt>
  452. <dd><p>Displays the contents of the &lsquo;<samp>.debug_str</samp>&rsquo;, &lsquo;<samp>.debug_line_str</samp>&rsquo;
  453. and/or &lsquo;<samp>.debug_str_offsets</samp>&rsquo; sections.
  454. </p>
  455. </dd>
  456. <dt><code>t</code></dt>
  457. <dt><code>=pubtype</code></dt>
  458. <dd><p>Displays the contents of the &lsquo;<samp>.debug_pubtypes</samp>&rsquo; and/or
  459. &lsquo;<samp>.debug_gnu_pubtypes</samp>&rsquo; sections.
  460. </p>
  461. </dd>
  462. <dt><code>T</code></dt>
  463. <dt><code>=trace_aranges</code></dt>
  464. <dd><p>Displays the contents of the &lsquo;<samp>.trace_aranges</samp>&rsquo; section.
  465. </p>
  466. </dd>
  467. <dt><code>u</code></dt>
  468. <dt><code>=trace_abbrev</code></dt>
  469. <dd><p>Displays the contents of the &lsquo;<samp>.trace_abbrev</samp>&rsquo; section.
  470. </p>
  471. </dd>
  472. <dt><code>U</code></dt>
  473. <dt><code>=trace_info</code></dt>
  474. <dd><p>Displays the contents of the &lsquo;<samp>.trace_info</samp>&rsquo; section.
  475. </p>
  476. </dd>
  477. </dl>
  478. <p>Note: displaying the contents of &lsquo;<samp>.debug_static_funcs</samp>&rsquo;,
  479. &lsquo;<samp>.debug_static_vars</samp>&rsquo; and &lsquo;<samp>debug_weaknames</samp>&rsquo; sections is not
  480. currently supported.
  481. </p>
  482. </dd>
  483. <dt><code>--dwarf-depth=<var>n</var></code></dt>
  484. <dd><p>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children.
  485. This is only useful with <samp>--debug-dump=info</samp>. The default is
  486. to print all DIEs; the special value 0 for <var>n</var> will also have this
  487. effect.
  488. </p>
  489. <p>With a non-zero value for <var>n</var>, DIEs at or deeper than <var>n</var>
  490. levels will not be printed. The range for <var>n</var> is zero-based.
  491. </p>
  492. </dd>
  493. <dt><code>--dwarf-start=<var>n</var></code></dt>
  494. <dd><p>Print only DIEs beginning with the DIE numbered <var>n</var>. This is only
  495. useful with <samp>--debug-dump=info</samp>.
  496. </p>
  497. <p>If specified, this option will suppress printing of any header
  498. information and all DIEs before the DIE numbered <var>n</var>. Only
  499. siblings and children of the specified DIE will be printed.
  500. </p>
  501. <p>This can be used in conjunction with <samp>--dwarf-depth</samp>.
  502. </p>
  503. </dd>
  504. <dt><code>--ctf=<var>section</var></code></dt>
  505. <dd><a name="index-CTF-1"></a>
  506. <a name="index-Compact-Type-Format-1"></a>
  507. <p>Display the contents of the specified CTF section. CTF sections themselves
  508. contain many subsections, all of which are displayed in order.
  509. </p>
  510. </dd>
  511. <dt><code>--ctf-parent=<var>section</var></code></dt>
  512. <dd>
  513. <p>Specify the name of another section from which the CTF dictionary can inherit
  514. types. (If none is specified, we assume the CTF dictionary inherits types
  515. from the default-named member of the archive contained within this section.)
  516. </p></dd>
  517. <dt><code>--ctf-symbols=<var>section</var></code></dt>
  518. <dt><code>--ctf-strings=<var>section</var></code></dt>
  519. <dd><p>Specify the name of another section from which the CTF file can inherit
  520. strings and symbols. By default, the <code>.symtab</code> and its linked
  521. string table are used.
  522. </p>
  523. <p>If either of <samp>--ctf-symbols</samp> or <samp>--ctf-strings</samp> is specified, the
  524. other must be specified as well.
  525. </p>
  526. </dd>
  527. <dt><code>-I</code></dt>
  528. <dt><code>--histogram</code></dt>
  529. <dd><p>Display a histogram of bucket list lengths when displaying the contents
  530. of the symbol tables.
  531. </p>
  532. </dd>
  533. <dt><code>-v</code></dt>
  534. <dt><code>--version</code></dt>
  535. <dd><p>Display the version number of readelf.
  536. </p>
  537. </dd>
  538. <dt><code>-W</code></dt>
  539. <dt><code>--wide</code></dt>
  540. <dd><p>Don&rsquo;t break output lines to fit into 80 columns. By default
  541. <code>readelf</code> breaks section header and segment listing lines for
  542. 64-bit ELF files, so that they fit into 80 columns. This option causes
  543. <code>readelf</code> to print each section header resp. each segment one a
  544. single line, which is far more readable on terminals wider than 80 columns.
  545. </p>
  546. </dd>
  547. <dt><code>-T</code></dt>
  548. <dt><code>--silent-truncation</code></dt>
  549. <dd><p>Normally when readelf is displaying a symbol name, and it has to
  550. truncate the name to fit into an 80 column display, it will add a
  551. suffix of <code>[...]</code> to the name. This command line option
  552. disables this behaviour, allowing 5 more characters of the name to be
  553. displayed and restoring the old behaviour of readelf (prior to release
  554. 2.35).
  555. </p>
  556. </dd>
  557. <dt><code>-H</code></dt>
  558. <dt><code>--help</code></dt>
  559. <dd><p>Display the command-line options understood by <code>readelf</code>.
  560. </p>
  561. </dd>
  562. </dl>
  563. <hr>
  564. <div class="header">
  565. <p>
  566. Next: <a href="elfedit.html#elfedit" accesskey="n" rel="next">elfedit</a>, Previous: <a href="dlltool.html#dlltool" accesskey="p" rel="prev">dlltool</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>
  567. </div>
  568. </body>
  569. </html>