riscv64-unknown-elf-readelf.1 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  1. .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "READELF 1"
  136. .TH READELF 1 "2022-04-26" "binutils-2.38" "GNU Development Tools"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. readelf \- display information about ELF files
  143. .SH "SYNOPSIS"
  144. .IX Header "SYNOPSIS"
  145. readelf [\fB\-a\fR|\fB\-\-all\fR]
  146. [\fB\-h\fR|\fB\-\-file\-header\fR]
  147. [\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR]
  148. [\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
  149. [\fB\-g\fR|\fB\-\-section\-groups\fR]
  150. [\fB\-t\fR|\fB\-\-section\-details\fR]
  151. [\fB\-e\fR|\fB\-\-headers\fR]
  152. [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
  153. [\fB\-\-dyn\-syms\fR|\fB\-\-lto\-syms\fR]
  154. [\fB\-\-sym\-base=[0|8|10|16]\fR]
  155. [\fB\-\-demangle\fR\fI=style\fR|\fB\-\-no\-demangle\fR]
  156. [\fB\-\-quiet\fR]
  157. [\fB\-\-recurse\-limit\fR|\fB\-\-no\-recurse\-limit\fR]
  158. [\fB\-U\fR \fImethod\fR|\fB\-\-unicode=\fR\fImethod\fR]
  159. [\fB\-n\fR|\fB\-\-notes\fR]
  160. [\fB\-r\fR|\fB\-\-relocs\fR]
  161. [\fB\-u\fR|\fB\-\-unwind\fR]
  162. [\fB\-d\fR|\fB\-\-dynamic\fR]
  163. [\fB\-V\fR|\fB\-\-version\-info\fR]
  164. [\fB\-A\fR|\fB\-\-arch\-specific\fR]
  165. [\fB\-D\fR|\fB\-\-use\-dynamic\fR]
  166. [\fB\-L\fR|\fB\-\-lint\fR|\fB\-\-enable\-checks\fR]
  167. [\fB\-x\fR <number or name>|\fB\-\-hex\-dump=\fR<number or name>]
  168. [\fB\-p\fR <number or name>|\fB\-\-string\-dump=\fR<number or name>]
  169. [\fB\-R\fR <number or name>|\fB\-\-relocated\-dump=\fR<number or name>]
  170. [\fB\-z\fR|\fB\-\-decompress\fR]
  171. [\fB\-c\fR|\fB\-\-archive\-index\fR]
  172. [\fB\-w[lLiaprmfFsoORtUuTgAck]\fR|
  173. \fB\-\-debug\-dump\fR[=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]]
  174. [\fB\-wK\fR|\fB\-\-debug\-dump=follow\-links\fR]
  175. [\fB\-wN\fR|\fB\-\-debug\-dump=no\-follow\-links\fR]
  176. [\fB\-P\fR|\fB\-\-process\-links\fR]
  177. [\fB\-\-dwarf\-depth=\fR\fIn\fR]
  178. [\fB\-\-dwarf\-start=\fR\fIn\fR]
  179. [\fB\-\-ctf=\fR\fIsection\fR]
  180. [\fB\-\-ctf\-parent=\fR\fIsection\fR]
  181. [\fB\-\-ctf\-symbols=\fR\fIsection\fR]
  182. [\fB\-\-ctf\-strings=\fR\fIsection\fR]
  183. [\fB\-I\fR|\fB\-\-histogram\fR]
  184. [\fB\-v\fR|\fB\-\-version\fR]
  185. [\fB\-W\fR|\fB\-\-wide\fR]
  186. [\fB\-T\fR|\fB\-\-silent\-truncation\fR]
  187. [\fB\-H\fR|\fB\-\-help\fR]
  188. \fIelffile\fR...
  189. .SH "DESCRIPTION"
  190. .IX Header "DESCRIPTION"
  191. \&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object
  192. files. The options control what particular information to display.
  193. .PP
  194. \&\fIelffile\fR... are the object files to be examined. 32\-bit and
  195. 64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files.
  196. .PP
  197. This program performs a similar function to \fBobjdump\fR but it
  198. goes into more detail and it exists independently of the \s-1BFD\s0
  199. library, so if there is a bug in \s-1BFD\s0 then readelf will not be
  200. affected.
  201. .SH "OPTIONS"
  202. .IX Header "OPTIONS"
  203. The long and short forms of options, shown here as alternatives, are
  204. equivalent. At least one option besides \fB\-v\fR or \fB\-H\fR must be
  205. given.
  206. .IP "\fB\-a\fR" 4
  207. .IX Item "-a"
  208. .PD 0
  209. .IP "\fB\-\-all\fR" 4
  210. .IX Item "--all"
  211. .PD
  212. Equivalent to specifying \fB\-\-file\-header\fR,
  213. \&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR,
  214. \&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR,
  215. \&\fB\-\-version\-info\fR, \fB\-\-arch\-specific\fR, \fB\-\-unwind\fR,
  216. \&\fB\-\-section\-groups\fR and \fB\-\-histogram\fR.
  217. .Sp
  218. Note \- this option does not enable \fB\-\-use\-dynamic\fR itself, so
  219. if that option is not present on the command line then dynamic symbols
  220. and dynamic relocs will not be displayed.
  221. .IP "\fB\-h\fR" 4
  222. .IX Item "-h"
  223. .PD 0
  224. .IP "\fB\-\-file\-header\fR" 4
  225. .IX Item "--file-header"
  226. .PD
  227. Displays the information contained in the \s-1ELF\s0 header at the start of the
  228. file.
  229. .IP "\fB\-l\fR" 4
  230. .IX Item "-l"
  231. .PD 0
  232. .IP "\fB\-\-program\-headers\fR" 4
  233. .IX Item "--program-headers"
  234. .IP "\fB\-\-segments\fR" 4
  235. .IX Item "--segments"
  236. .PD
  237. Displays the information contained in the file's segment headers, if it
  238. has any.
  239. .IP "\fB\-\-quiet\fR" 4
  240. .IX Item "--quiet"
  241. Suppress \*(L"no symbols\*(R" diagnostic.
  242. .IP "\fB\-S\fR" 4
  243. .IX Item "-S"
  244. .PD 0
  245. .IP "\fB\-\-sections\fR" 4
  246. .IX Item "--sections"
  247. .IP "\fB\-\-section\-headers\fR" 4
  248. .IX Item "--section-headers"
  249. .PD
  250. Displays the information contained in the file's section headers, if it
  251. has any.
  252. .IP "\fB\-g\fR" 4
  253. .IX Item "-g"
  254. .PD 0
  255. .IP "\fB\-\-section\-groups\fR" 4
  256. .IX Item "--section-groups"
  257. .PD
  258. Displays the information contained in the file's section groups, if it
  259. has any.
  260. .IP "\fB\-t\fR" 4
  261. .IX Item "-t"
  262. .PD 0
  263. .IP "\fB\-\-section\-details\fR" 4
  264. .IX Item "--section-details"
  265. .PD
  266. Displays the detailed section information. Implies \fB\-S\fR.
  267. .IP "\fB\-s\fR" 4
  268. .IX Item "-s"
  269. .PD 0
  270. .IP "\fB\-\-symbols\fR" 4
  271. .IX Item "--symbols"
  272. .IP "\fB\-\-syms\fR" 4
  273. .IX Item "--syms"
  274. .PD
  275. Displays the entries in symbol table section of the file, if it has one.
  276. If a symbol has version information associated with it then this is
  277. displayed as well. The version string is displayed as a suffix to the
  278. symbol name, preceded by an @ character. For example
  279. \&\fBfoo@VER_1\fR. If the version is the default version to be used
  280. when resolving unversioned references to the symbol then it is
  281. displayed as a suffix preceded by two @ characters. For example
  282. \&\fBfoo@@VER_2\fR.
  283. .IP "\fB\-\-dyn\-syms\fR" 4
  284. .IX Item "--dyn-syms"
  285. Displays the entries in dynamic symbol table section of the file, if it
  286. has one. The output format is the same as the format used by the
  287. \&\fB\-\-syms\fR option.
  288. .IP "\fB\-\-lto\-syms\fR" 4
  289. .IX Item "--lto-syms"
  290. Displays the contents of any \s-1LTO\s0 symbol tables in the file.
  291. .IP "\fB\-\-sym\-base=[0|8|10|16]\fR" 4
  292. .IX Item "--sym-base=[0|8|10|16]"
  293. Forces the size field of the symbol table to use the given base. Any
  294. unrecognized options will be treated as \fB0\fR. \fB\-\-sym\-base=0\fR
  295. represents the default and legacy behaviour. This will output sizes as decimal
  296. for numbers less than 100000. For sizes 100000 and greater hexadecimal notation
  297. will be used with a 0x prefix.
  298. \&\fB\-\-sym\-base=8\fR will give the symbol sizes in octal.
  299. \&\fB\-\-sym\-base=10\fR will always give the symbol sizes in decimal.
  300. \&\fB\-\-sym\-base=16\fR will always give the symbol sizes in hexadecimal with a
  301. 0x prefix.
  302. .IP "\fB\-C\fR" 4
  303. .IX Item "-C"
  304. .PD 0
  305. .IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
  306. .IX Item "--demangle[=style]"
  307. .PD
  308. Decode (\fIdemangle\fR) low-level symbol names into user-level names.
  309. This makes \*(C+ function names readable. Different compilers have
  310. different mangling styles. The optional demangling style argument can
  311. be used to choose an appropriate demangling style for your
  312. compiler.
  313. .IP "\fB\-\-no\-demangle\fR" 4
  314. .IX Item "--no-demangle"
  315. Do not demangle low-level symbol names. This is the default.
  316. .IP "\fB\-\-recurse\-limit\fR" 4
  317. .IX Item "--recurse-limit"
  318. .PD 0
  319. .IP "\fB\-\-no\-recurse\-limit\fR" 4
  320. .IX Item "--no-recurse-limit"
  321. .IP "\fB\-\-recursion\-limit\fR" 4
  322. .IX Item "--recursion-limit"
  323. .IP "\fB\-\-no\-recursion\-limit\fR" 4
  324. .IX Item "--no-recursion-limit"
  325. .PD
  326. Enables or disables a limit on the amount of recursion performed
  327. whilst demangling strings. Since the name mangling formats allow for
  328. an infinite level of recursion it is possible to create strings whose
  329. decoding will exhaust the amount of stack space available on the host
  330. machine, triggering a memory fault. The limit tries to prevent this
  331. from happening by restricting recursion to 2048 levels of nesting.
  332. .Sp
  333. The default is for this limit to be enabled, but disabling it may be
  334. necessary in order to demangle truly complicated names. Note however
  335. that if the recursion limit is disabled then stack exhaustion is
  336. possible and any bug reports about such an event will be rejected.
  337. .IP "\fB\-U\fR \fI[d|i|l|e|x|h]\fR" 4
  338. .IX Item "-U [d|i|l|e|x|h]"
  339. .PD 0
  340. .IP "\fB\-\-unicode=[default|invalid|locale|escape|hex|highlight]\fR" 4
  341. .IX Item "--unicode=[default|invalid|locale|escape|hex|highlight]"
  342. .PD
  343. Controls the display of non-ASCII characters in identifier names.
  344. The default (\fB\-\-unicode=locale\fR or \fB\-\-unicode=default\fR) is
  345. to treat them as multibyte characters and display them in the current
  346. locale. All other versions of this option treat the bytes as \s-1UTF\-8\s0
  347. encoded values and attempt to interpret them. If they cannot be
  348. interpreted or if the \fB\-\-unicode=invalid\fR option is used then
  349. they are displayed as a sequence of hex bytes, encloses in curly
  350. parethesis characters.
  351. .Sp
  352. Using the \fB\-\-unicode=escape\fR option will display the characters
  353. as as unicode escape sequences (\fI\euxxxx\fR). Using the
  354. \&\fB\-\-unicode=hex\fR will display the characters as hex byte
  355. sequences enclosed between angle brackets.
  356. .Sp
  357. Using the \fB\-\-unicode=highlight\fR will display the characters as
  358. unicode escape sequences but it will also highlighted them in red,
  359. assuming that colouring is supported by the output device. The
  360. colouring is intended to draw attention to the presence of unicode
  361. sequences when they might not be expected.
  362. .IP "\fB\-e\fR" 4
  363. .IX Item "-e"
  364. .PD 0
  365. .IP "\fB\-\-headers\fR" 4
  366. .IX Item "--headers"
  367. .PD
  368. Display all the headers in the file. Equivalent to \fB\-h \-l \-S\fR.
  369. .IP "\fB\-n\fR" 4
  370. .IX Item "-n"
  371. .PD 0
  372. .IP "\fB\-\-notes\fR" 4
  373. .IX Item "--notes"
  374. .PD
  375. Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any.
  376. .IP "\fB\-r\fR" 4
  377. .IX Item "-r"
  378. .PD 0
  379. .IP "\fB\-\-relocs\fR" 4
  380. .IX Item "--relocs"
  381. .PD
  382. Displays the contents of the file's relocation section, if it has one.
  383. .IP "\fB\-u\fR" 4
  384. .IX Item "-u"
  385. .PD 0
  386. .IP "\fB\-\-unwind\fR" 4
  387. .IX Item "--unwind"
  388. .PD
  389. Displays the contents of the file's unwind section, if it has one. Only
  390. the unwind sections for \s-1IA64 ELF\s0 files, as well as \s-1ARM\s0 unwind tables
  391. (\f(CW\*(C`.ARM.exidx\*(C'\fR / \f(CW\*(C`.ARM.extab\*(C'\fR) are currently supported. If
  392. support is not yet implemented for your architecture you could try
  393. dumping the contents of the \fI.eh_frames\fR section using the
  394. \&\fB\-\-debug\-dump=frames\fR or \fB\-\-debug\-dump=frames\-interp\fR
  395. options.
  396. .IP "\fB\-d\fR" 4
  397. .IX Item "-d"
  398. .PD 0
  399. .IP "\fB\-\-dynamic\fR" 4
  400. .IX Item "--dynamic"
  401. .PD
  402. Displays the contents of the file's dynamic section, if it has one.
  403. .IP "\fB\-V\fR" 4
  404. .IX Item "-V"
  405. .PD 0
  406. .IP "\fB\-\-version\-info\fR" 4
  407. .IX Item "--version-info"
  408. .PD
  409. Displays the contents of the version sections in the file, it they
  410. exist.
  411. .IP "\fB\-A\fR" 4
  412. .IX Item "-A"
  413. .PD 0
  414. .IP "\fB\-\-arch\-specific\fR" 4
  415. .IX Item "--arch-specific"
  416. .PD
  417. Displays architecture-specific information in the file, if there
  418. is any.
  419. .IP "\fB\-D\fR" 4
  420. .IX Item "-D"
  421. .PD 0
  422. .IP "\fB\-\-use\-dynamic\fR" 4
  423. .IX Item "--use-dynamic"
  424. .PD
  425. When displaying symbols, this option makes \fBreadelf\fR use the
  426. symbol hash tables in the file's dynamic section, rather than the
  427. symbol table sections.
  428. .Sp
  429. When displaying relocations, this option makes \fBreadelf\fR
  430. display the dynamic relocations rather than the static relocations.
  431. .IP "\fB\-L\fR" 4
  432. .IX Item "-L"
  433. .PD 0
  434. .IP "\fB\-\-lint\fR" 4
  435. .IX Item "--lint"
  436. .IP "\fB\-\-enable\-checks\fR" 4
  437. .IX Item "--enable-checks"
  438. .PD
  439. Displays warning messages about possible problems with the file(s)
  440. being examined. If used on its own then all of the contents of the
  441. file(s) will be examined. If used with one of the dumping options
  442. then the warning messages will only be produced for the things being
  443. displayed.
  444. .IP "\fB\-x <number or name>\fR" 4
  445. .IX Item "-x <number or name>"
  446. .PD 0
  447. .IP "\fB\-\-hex\-dump=<number or name>\fR" 4
  448. .IX Item "--hex-dump=<number or name>"
  449. .PD
  450. Displays the contents of the indicated section as a hexadecimal bytes.
  451. A number identifies a particular section by index in the section table;
  452. any other string identifies all sections with that name in the object file.
  453. .IP "\fB\-R <number or name>\fR" 4
  454. .IX Item "-R <number or name>"
  455. .PD 0
  456. .IP "\fB\-\-relocated\-dump=<number or name>\fR" 4
  457. .IX Item "--relocated-dump=<number or name>"
  458. .PD
  459. Displays the contents of the indicated section as a hexadecimal
  460. bytes. A number identifies a particular section by index in the
  461. section table; any other string identifies all sections with that name
  462. in the object file. The contents of the section will be relocated
  463. before they are displayed.
  464. .IP "\fB\-p <number or name>\fR" 4
  465. .IX Item "-p <number or name>"
  466. .PD 0
  467. .IP "\fB\-\-string\-dump=<number or name>\fR" 4
  468. .IX Item "--string-dump=<number or name>"
  469. .PD
  470. Displays the contents of the indicated section as printable strings.
  471. A number identifies a particular section by index in the section table;
  472. any other string identifies all sections with that name in the object file.
  473. .IP "\fB\-z\fR" 4
  474. .IX Item "-z"
  475. .PD 0
  476. .IP "\fB\-\-decompress\fR" 4
  477. .IX Item "--decompress"
  478. .PD
  479. Requests that the section(s) being dumped by \fBx\fR, \fBR\fR or
  480. \&\fBp\fR options are decompressed before being displayed. If the
  481. section(s) are not compressed then they are displayed as is.
  482. .IP "\fB\-c\fR" 4
  483. .IX Item "-c"
  484. .PD 0
  485. .IP "\fB\-\-archive\-index\fR" 4
  486. .IX Item "--archive-index"
  487. .PD
  488. Displays the file symbol index information contained in the header part
  489. of binary archives. Performs the same function as the \fBt\fR
  490. command to \fBar\fR, but without using the \s-1BFD\s0 library.
  491. .IP "\fB\-w[lLiaprmfFsOoRtUuTgAckK]\fR" 4
  492. .IX Item "-w[lLiaprmfFsOoRtUuTgAckK]"
  493. .PD 0
  494. .IP "\fB\-\-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]\fR" 4
  495. .IX Item "--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]"
  496. .PD
  497. Displays the contents of the \s-1DWARF\s0 debug sections in the file, if any
  498. are present. Compressed debug sections are automatically decompressed
  499. (temporarily) before they are displayed. If one or more of the
  500. optional letters or words follows the switch then only those type(s)
  501. of data will be dumped. The letters and words refer to the following
  502. information:
  503. .RS 4
  504. .ie n .IP """a""" 4
  505. .el .IP "\f(CWa\fR" 4
  506. .IX Item "a"
  507. .PD 0
  508. .ie n .IP """=abbrev""" 4
  509. .el .IP "\f(CW=abbrev\fR" 4
  510. .IX Item "=abbrev"
  511. .PD
  512. Displays the contents of the \fB.debug_abbrev\fR section.
  513. .ie n .IP """A""" 4
  514. .el .IP "\f(CWA\fR" 4
  515. .IX Item "A"
  516. .PD 0
  517. .ie n .IP """=addr""" 4
  518. .el .IP "\f(CW=addr\fR" 4
  519. .IX Item "=addr"
  520. .PD
  521. Displays the contents of the \fB.debug_addr\fR section.
  522. .ie n .IP """c""" 4
  523. .el .IP "\f(CWc\fR" 4
  524. .IX Item "c"
  525. .PD 0
  526. .ie n .IP """=cu_index""" 4
  527. .el .IP "\f(CW=cu_index\fR" 4
  528. .IX Item "=cu_index"
  529. .PD
  530. Displays the contents of the \fB.debug_cu_index\fR and/or
  531. \&\fB.debug_tu_index\fR sections.
  532. .ie n .IP """f""" 4
  533. .el .IP "\f(CWf\fR" 4
  534. .IX Item "f"
  535. .PD 0
  536. .ie n .IP """=frames""" 4
  537. .el .IP "\f(CW=frames\fR" 4
  538. .IX Item "=frames"
  539. .PD
  540. Display the raw contents of a \fB.debug_frame\fR section.
  541. .ie n .IP """F""" 4
  542. .el .IP "\f(CWF\fR" 4
  543. .IX Item "F"
  544. .PD 0
  545. .ie n .IP """=frames\-interp""" 4
  546. .el .IP "\f(CW=frames\-interp\fR" 4
  547. .IX Item "=frames-interp"
  548. .PD
  549. Display the interpreted contents of a \fB.debug_frame\fR section.
  550. .ie n .IP """g""" 4
  551. .el .IP "\f(CWg\fR" 4
  552. .IX Item "g"
  553. .PD 0
  554. .ie n .IP """=gdb_index""" 4
  555. .el .IP "\f(CW=gdb_index\fR" 4
  556. .IX Item "=gdb_index"
  557. .PD
  558. Displays the contents of the \fB.gdb_index\fR and/or
  559. \&\fB.debug_names\fR sections.
  560. .ie n .IP """i""" 4
  561. .el .IP "\f(CWi\fR" 4
  562. .IX Item "i"
  563. .PD 0
  564. .ie n .IP """=info""" 4
  565. .el .IP "\f(CW=info\fR" 4
  566. .IX Item "=info"
  567. .PD
  568. Displays the contents of the \fB.debug_info\fR section. Note: the
  569. output from this option can also be restricted by the use of the
  570. \&\fB\-\-dwarf\-depth\fR and \fB\-\-dwarf\-start\fR options.
  571. .ie n .IP """k""" 4
  572. .el .IP "\f(CWk\fR" 4
  573. .IX Item "k"
  574. .PD 0
  575. .ie n .IP """=links""" 4
  576. .el .IP "\f(CW=links\fR" 4
  577. .IX Item "=links"
  578. .PD
  579. Displays the contents of the \fB.gnu_debuglink\fR,
  580. \&\fB.gnu_debugaltlink\fR and \fB.debug_sup\fR sections, if any of
  581. them are present. Also displays any links to separate dwarf object
  582. files (dwo), if they are specified by the DW_AT_GNU_dwo_name or
  583. DW_AT_dwo_name attributes in the \fB.debug_info\fR section.
  584. .ie n .IP """K""" 4
  585. .el .IP "\f(CWK\fR" 4
  586. .IX Item "K"
  587. .PD 0
  588. .ie n .IP """=follow\-links""" 4
  589. .el .IP "\f(CW=follow\-links\fR" 4
  590. .IX Item "=follow-links"
  591. .PD
  592. Display the contents of any selected debug sections that are found in
  593. linked, separate debug info file(s). This can result in multiple
  594. versions of the same debug section being displayed if it exists in
  595. more than one file.
  596. .Sp
  597. In addition, when displaying \s-1DWARF\s0 attributes, if a form is found that
  598. references the separate debug info file, then the referenced contents
  599. will also be displayed.
  600. .Sp
  601. Note \- in some distributions this option is enabled by default. It
  602. can be disabled via the \fBN\fR debug option. The default can be
  603. chosen when configuring the binutils via the
  604. \&\fB\-\-enable\-follow\-debug\-links=yes\fR or
  605. \&\fB\-\-enable\-follow\-debug\-links=no\fR options. If these are not
  606. used then the default is to enable the following of debug links.
  607. .ie n .IP """N""" 4
  608. .el .IP "\f(CWN\fR" 4
  609. .IX Item "N"
  610. .PD 0
  611. .ie n .IP """=no\-follow\-links""" 4
  612. .el .IP "\f(CW=no\-follow\-links\fR" 4
  613. .IX Item "=no-follow-links"
  614. .PD
  615. Disables the following of links to separate debug info files.
  616. .ie n .IP """l""" 4
  617. .el .IP "\f(CWl\fR" 4
  618. .IX Item "l"
  619. .PD 0
  620. .ie n .IP """=rawline""" 4
  621. .el .IP "\f(CW=rawline\fR" 4
  622. .IX Item "=rawline"
  623. .PD
  624. Displays the contents of the \fB.debug_line\fR section in a raw
  625. format.
  626. .ie n .IP """L""" 4
  627. .el .IP "\f(CWL\fR" 4
  628. .IX Item "L"
  629. .PD 0
  630. .ie n .IP """=decodedline""" 4
  631. .el .IP "\f(CW=decodedline\fR" 4
  632. .IX Item "=decodedline"
  633. .PD
  634. Displays the interpreted contents of the \fB.debug_line\fR section.
  635. .ie n .IP """m""" 4
  636. .el .IP "\f(CWm\fR" 4
  637. .IX Item "m"
  638. .PD 0
  639. .ie n .IP """=macro""" 4
  640. .el .IP "\f(CW=macro\fR" 4
  641. .IX Item "=macro"
  642. .PD
  643. Displays the contents of the \fB.debug_macro\fR and/or
  644. \&\fB.debug_macinfo\fR sections.
  645. .ie n .IP """o""" 4
  646. .el .IP "\f(CWo\fR" 4
  647. .IX Item "o"
  648. .PD 0
  649. .ie n .IP """=loc""" 4
  650. .el .IP "\f(CW=loc\fR" 4
  651. .IX Item "=loc"
  652. .PD
  653. Displays the contents of the \fB.debug_loc\fR and/or
  654. \&\fB.debug_loclists\fR sections.
  655. .ie n .IP """O""" 4
  656. .el .IP "\f(CWO\fR" 4
  657. .IX Item "O"
  658. .PD 0
  659. .ie n .IP """=str\-offsets""" 4
  660. .el .IP "\f(CW=str\-offsets\fR" 4
  661. .IX Item "=str-offsets"
  662. .PD
  663. Displays the contents of the \fB.debug_str_offsets\fR section.
  664. .ie n .IP """p""" 4
  665. .el .IP "\f(CWp\fR" 4
  666. .IX Item "p"
  667. .PD 0
  668. .ie n .IP """=pubnames""" 4
  669. .el .IP "\f(CW=pubnames\fR" 4
  670. .IX Item "=pubnames"
  671. .PD
  672. Displays the contents of the \fB.debug_pubnames\fR and/or
  673. \&\fB.debug_gnu_pubnames\fR sections.
  674. .ie n .IP """r""" 4
  675. .el .IP "\f(CWr\fR" 4
  676. .IX Item "r"
  677. .PD 0
  678. .ie n .IP """=aranges""" 4
  679. .el .IP "\f(CW=aranges\fR" 4
  680. .IX Item "=aranges"
  681. .PD
  682. Displays the contents of the \fB.debug_aranges\fR section.
  683. .ie n .IP """R""" 4
  684. .el .IP "\f(CWR\fR" 4
  685. .IX Item "R"
  686. .PD 0
  687. .ie n .IP """=Ranges""" 4
  688. .el .IP "\f(CW=Ranges\fR" 4
  689. .IX Item "=Ranges"
  690. .PD
  691. Displays the contents of the \fB.debug_ranges\fR and/or
  692. \&\fB.debug_rnglists\fR sections.
  693. .ie n .IP """s""" 4
  694. .el .IP "\f(CWs\fR" 4
  695. .IX Item "s"
  696. .PD 0
  697. .ie n .IP """=str""" 4
  698. .el .IP "\f(CW=str\fR" 4
  699. .IX Item "=str"
  700. .PD
  701. Displays the contents of the \fB.debug_str\fR, \fB.debug_line_str\fR
  702. and/or \fB.debug_str_offsets\fR sections.
  703. .ie n .IP """t""" 4
  704. .el .IP "\f(CWt\fR" 4
  705. .IX Item "t"
  706. .PD 0
  707. .ie n .IP """=pubtype""" 4
  708. .el .IP "\f(CW=pubtype\fR" 4
  709. .IX Item "=pubtype"
  710. .PD
  711. Displays the contents of the \fB.debug_pubtypes\fR and/or
  712. \&\fB.debug_gnu_pubtypes\fR sections.
  713. .ie n .IP """T""" 4
  714. .el .IP "\f(CWT\fR" 4
  715. .IX Item "T"
  716. .PD 0
  717. .ie n .IP """=trace_aranges""" 4
  718. .el .IP "\f(CW=trace_aranges\fR" 4
  719. .IX Item "=trace_aranges"
  720. .PD
  721. Displays the contents of the \fB.trace_aranges\fR section.
  722. .ie n .IP """u""" 4
  723. .el .IP "\f(CWu\fR" 4
  724. .IX Item "u"
  725. .PD 0
  726. .ie n .IP """=trace_abbrev""" 4
  727. .el .IP "\f(CW=trace_abbrev\fR" 4
  728. .IX Item "=trace_abbrev"
  729. .PD
  730. Displays the contents of the \fB.trace_abbrev\fR section.
  731. .ie n .IP """U""" 4
  732. .el .IP "\f(CWU\fR" 4
  733. .IX Item "U"
  734. .PD 0
  735. .ie n .IP """=trace_info""" 4
  736. .el .IP "\f(CW=trace_info\fR" 4
  737. .IX Item "=trace_info"
  738. .PD
  739. Displays the contents of the \fB.trace_info\fR section.
  740. .RE
  741. .RS 4
  742. .Sp
  743. Note: displaying the contents of \fB.debug_static_funcs\fR,
  744. \&\fB.debug_static_vars\fR and \fBdebug_weaknames\fR sections is not
  745. currently supported.
  746. .RE
  747. .IP "\fB\-\-dwarf\-depth=\fR\fIn\fR" 4
  748. .IX Item "--dwarf-depth=n"
  749. Limit the dump of the \f(CW\*(C`.debug_info\*(C'\fR section to \fIn\fR children.
  750. This is only useful with \fB\-\-debug\-dump=info\fR. The default is
  751. to print all DIEs; the special value 0 for \fIn\fR will also have this
  752. effect.
  753. .Sp
  754. With a non-zero value for \fIn\fR, DIEs at or deeper than \fIn\fR
  755. levels will not be printed. The range for \fIn\fR is zero-based.
  756. .IP "\fB\-\-dwarf\-start=\fR\fIn\fR" 4
  757. .IX Item "--dwarf-start=n"
  758. Print only DIEs beginning with the \s-1DIE\s0 numbered \fIn\fR. This is only
  759. useful with \fB\-\-debug\-dump=info\fR.
  760. .Sp
  761. If specified, this option will suppress printing of any header
  762. information and all DIEs before the \s-1DIE\s0 numbered \fIn\fR. Only
  763. siblings and children of the specified \s-1DIE\s0 will be printed.
  764. .Sp
  765. This can be used in conjunction with \fB\-\-dwarf\-depth\fR.
  766. .IP "\fB\-P\fR" 4
  767. .IX Item "-P"
  768. .PD 0
  769. .IP "\fB\-\-process\-links\fR" 4
  770. .IX Item "--process-links"
  771. .PD
  772. Display the contents of non-debug sections found in separate debuginfo
  773. files that are linked to the main file. This option automatically
  774. implies the \fB\-wK\fR option, and only sections requested by other
  775. command line options will be displayed.
  776. .IP "\fB\-\-ctf[=\fR\fIsection\fR\fB]\fR" 4
  777. .IX Item "--ctf[=section]"
  778. Display the contents of the specified \s-1CTF\s0 section. \s-1CTF\s0 sections themselves
  779. contain many subsections, all of which are displayed in order.
  780. .Sp
  781. By default, display the name of the section named \fI.ctf\fR, which is the
  782. name emitted by \fBld\fR.
  783. .IP "\fB\-\-ctf\-parent=\fR\fImember\fR" 4
  784. .IX Item "--ctf-parent=member"
  785. If the \s-1CTF\s0 section contains ambiguously-defined types, it will consist
  786. of an archive of many \s-1CTF\s0 dictionaries, all inheriting from one
  787. dictionary containing unambiguous types. This member is by default
  788. named \fI.ctf\fR, like the section containing it, but it is possible to
  789. change this name using the \f(CW\*(C`ctf_link_set_memb_name_changer\*(C'\fR
  790. function at link time. When looking at \s-1CTF\s0 archives that have been
  791. created by a linker that uses the name changer to rename the parent
  792. archive member, \fB\-\-ctf\-parent\fR can be used to specify the name
  793. used for the parent.
  794. .IP "\fB\-\-ctf\-symbols=\fR\fIsection\fR" 4
  795. .IX Item "--ctf-symbols=section"
  796. .PD 0
  797. .IP "\fB\-\-ctf\-strings=\fR\fIsection\fR" 4
  798. .IX Item "--ctf-strings=section"
  799. .PD
  800. Specify the name of another section from which the \s-1CTF\s0 file can inherit
  801. strings and symbols. By default, the \f(CW\*(C`.symtab\*(C'\fR and its linked
  802. string table are used.
  803. .Sp
  804. If either of \fB\-\-ctf\-symbols\fR or \fB\-\-ctf\-strings\fR is specified, the
  805. other must be specified as well.
  806. .IP "\fB\-I\fR" 4
  807. .IX Item "-I"
  808. .PD 0
  809. .IP "\fB\-\-histogram\fR" 4
  810. .IX Item "--histogram"
  811. .PD
  812. Display a histogram of bucket list lengths when displaying the contents
  813. of the symbol tables.
  814. .IP "\fB\-v\fR" 4
  815. .IX Item "-v"
  816. .PD 0
  817. .IP "\fB\-\-version\fR" 4
  818. .IX Item "--version"
  819. .PD
  820. Display the version number of readelf.
  821. .IP "\fB\-W\fR" 4
  822. .IX Item "-W"
  823. .PD 0
  824. .IP "\fB\-\-wide\fR" 4
  825. .IX Item "--wide"
  826. .PD
  827. Don't break output lines to fit into 80 columns. By default
  828. \&\fBreadelf\fR breaks section header and segment listing lines for
  829. 64\-bit \s-1ELF\s0 files, so that they fit into 80 columns. This option causes
  830. \&\fBreadelf\fR to print each section header resp. each segment one a
  831. single line, which is far more readable on terminals wider than 80 columns.
  832. .IP "\fB\-T\fR" 4
  833. .IX Item "-T"
  834. .PD 0
  835. .IP "\fB\-\-silent\-truncation\fR" 4
  836. .IX Item "--silent-truncation"
  837. .PD
  838. Normally when readelf is displaying a symbol name, and it has to
  839. truncate the name to fit into an 80 column display, it will add a
  840. suffix of \f(CW\*(C`[...]\*(C'\fR to the name. This command line option
  841. disables this behaviour, allowing 5 more characters of the name to be
  842. displayed and restoring the old behaviour of readelf (prior to release
  843. 2.35).
  844. .IP "\fB\-H\fR" 4
  845. .IX Item "-H"
  846. .PD 0
  847. .IP "\fB\-\-help\fR" 4
  848. .IX Item "--help"
  849. .PD
  850. Display the command-line options understood by \fBreadelf\fR.
  851. .IP "\fB@\fR\fIfile\fR" 4
  852. .IX Item "@file"
  853. Read command-line options from \fIfile\fR. The options read are
  854. inserted in place of the original @\fIfile\fR option. If \fIfile\fR
  855. does not exist, or cannot be read, then the option will be treated
  856. literally, and not removed.
  857. .Sp
  858. Options in \fIfile\fR are separated by whitespace. A whitespace
  859. character may be included in an option by surrounding the entire
  860. option in either single or double quotes. Any character (including a
  861. backslash) may be included by prefixing the character to be included
  862. with a backslash. The \fIfile\fR may itself contain additional
  863. @\fIfile\fR options; any such options will be processed recursively.
  864. .SH "SEE ALSO"
  865. .IX Header "SEE ALSO"
  866. \&\fBobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
  867. .SH "COPYRIGHT"
  868. .IX Header "COPYRIGHT"
  869. Copyright (c) 1991\-2022 Free Software Foundation, Inc.
  870. .PP
  871. Permission is granted to copy, distribute and/or modify this document
  872. under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
  873. or any later version published by the Free Software Foundation;
  874. with no Invariant Sections, with no Front-Cover Texts, and with no
  875. Back-Cover Texts. A copy of the license is included in the
  876. section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".