1READELF(1)                   GNU Development Tools                  READELF(1)
2
3
4

NAME

6       readelf - display information about ELF files
7

SYNOPSIS

9       readelf [-a|--all]
10               [-h|--file-header]
11               [-l|--program-headers|--segments]
12               [-S|--section-headers|--sections]
13               [-g|--section-groups]
14               [-t|--section-details]
15               [-e|--headers]
16               [-s|--syms|--symbols]
17               [--dyn-syms]
18               [-n|--notes]
19               [-r|--relocs]
20               [-u|--unwind]
21               [-d|--dynamic]
22               [-V|--version-info]
23               [-A|--arch-specific]
24               [-D|--use-dynamic]
25               [-L|--lint|--enable-checks]
26               [-x <number or name>|--hex-dump=<number or name>]
27               [-p <number or name>|--string-dump=<number or name>]
28               [-R <number or name>|--relocated-dump=<number or name>]
29               [-z|--decompress]
30               [-c|--archive-index]
31               [-w[lLiaprmfFsoORtUuTgAckK]|
32                --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]]
33               [--dwarf-depth=n]
34               [--dwarf-start=n]
35               [--ctf=section]
36               [--ctf-parent=section]
37               [--ctf-symbols=section]
38               [--ctf-strings=section]
39               [-I|--histogram]
40               [-v|--version]
41               [-W|--wide]
42               [-T|--silent-truncation]
43               [-H|--help]
44               elffile...
45

DESCRIPTION

47       readelf displays information about one or more ELF format object files.
48       The options control what particular information to display.
49
50       elffile... are the object files to be examined.  32-bit and 64-bit ELF
51       files are supported, as are archives containing ELF files.
52
53       This program performs a similar function to objdump but it goes into
54       more detail and it exists independently of the BFD library, so if there
55       is a bug in BFD then readelf will not be affected.
56

OPTIONS

58       The long and short forms of options, shown here as alternatives, are
59       equivalent.  At least one option besides -v or -H must be given.
60
61       -a
62       --all
63           Equivalent to specifying --file-header, --program-headers,
64           --sections, --symbols, --relocs, --dynamic, --notes,
65           --version-info, --arch-specific, --unwind, --section-groups and
66           --histogram.
67
68           Note - this option does not enable --use-dynamic itself, so if that
69           option is not present on the command line then dynamic symbols and
70           dynamic relocs will not be displayed.
71
72       -h
73       --file-header
74           Displays the information contained in the ELF header at the start
75           of the file.
76
77       -l
78       --program-headers
79       --segments
80           Displays the information contained in the file's segment headers,
81           if it has any.
82
83       -S
84       --sections
85       --section-headers
86           Displays the information contained in the file's section headers,
87           if it has any.
88
89       -g
90       --section-groups
91           Displays the information contained in the file's section groups, if
92           it has any.
93
94       -t
95       --section-details
96           Displays the detailed section information. Implies -S.
97
98       -s
99       --symbols
100       --syms
101           Displays the entries in symbol table section of the file, if it has
102           one.  If a symbol has version information associated with it then
103           this is displayed as well.  The version string is displayed as a
104           suffix to the symbol name, preceeded by an @ character.  For
105           example foo@VER_1.  If the version is the default version to be
106           used when resolving unversioned references to the symbol then it is
107           displayed as a suffix preceeded by two @ characters.  For example
108           foo@@VER_2.
109
110       --dyn-syms
111           Displays the entries in dynamic symbol table section of the file,
112           if it has one.  The output format is the same as the format used by
113           the --syms option.
114
115       -e
116       --headers
117           Display all the headers in the file.  Equivalent to -h -l -S.
118
119       -n
120       --notes
121           Displays the contents of the NOTE segments and/or sections, if any.
122
123       -r
124       --relocs
125           Displays the contents of the file's relocation section, if it has
126           one.
127
128       -u
129       --unwind
130           Displays the contents of the file's unwind section, if it has one.
131           Only the unwind sections for IA64 ELF files, as well as ARM unwind
132           tables (".ARM.exidx" / ".ARM.extab") are currently supported.  If
133           support is not yet implemented for your architecture you could try
134           dumping the contents of the .eh_frames section using the
135           --debug-dump=frames or --debug-dump=frames-interp options.
136
137       -d
138       --dynamic
139           Displays the contents of the file's dynamic section, if it has one.
140
141       -V
142       --version-info
143           Displays the contents of the version sections in the file, it they
144           exist.
145
146       -A
147       --arch-specific
148           Displays architecture-specific information in the file, if there is
149           any.
150
151       -D
152       --use-dynamic
153           When displaying symbols, this option makes readelf use the symbol
154           hash tables in the file's dynamic section, rather than the symbol
155           table sections.
156
157           When displaying relocations, this option makes readelf display the
158           dynamic relocations rather than the static relocations.
159
160       -L
161       --lint
162       --enable-checks
163           Displays warning messages about possible problems with the file(s)
164           being examined.  If used on its own then all of the contents of the
165           file(s) will be examined.  If used with one of the dumping options
166           then the warning messages will only be produced for the things
167           being displayed.
168
169       -x <number or name>
170       --hex-dump=<number or name>
171           Displays the contents of the indicated section as a hexadecimal
172           bytes.  A number identifies a particular section by index in the
173           section table; any other string identifies all sections with that
174           name in the object file.
175
176       -R <number or name>
177       --relocated-dump=<number or name>
178           Displays the contents of the indicated section as a hexadecimal
179           bytes.  A number identifies a particular section by index in the
180           section table; any other string identifies all sections with that
181           name in the object file.  The contents of the section will be
182           relocated before they are displayed.
183
184       -p <number or name>
185       --string-dump=<number or name>
186           Displays the contents of the indicated section as printable
187           strings.  A number identifies a particular section by index in the
188           section table; any other string identifies all sections with that
189           name in the object file.
190
191       -z
192       --decompress
193           Requests that the section(s) being dumped by x, R or p options are
194           decompressed before being displayed.  If the section(s) are not
195           compressed then they are displayed as is.
196
197       -c
198       --archive-index
199           Displays the file symbol index information contained in the header
200           part of binary archives.  Performs the same function as the t
201           command to ar, but without using the BFD library.
202
203       -w[lLiaprmfFsOoRtUuTgAckK]
204       --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]
205           Displays the contents of the DWARF debug sections in the file, if
206           any are present.  Compressed debug sections are automatically
207           decompressed (temporarily) before they are displayed.  If one or
208           more of the optional letters or words follows the switch then only
209           those type(s) of data will be dumped.  The letters and words refer
210           to the following information:
211
212           "a"
213           "=abbrev"
214               Displays the contents of the .debug_abbrev section.
215
216           "A"
217           "=addr"
218               Displays the contents of the .debug_addr section.
219
220           "c"
221           "=cu_index"
222               Displays the contents of the .debug_cu_index and/or
223               .debug_tu_index sections.
224
225           "f"
226           "=frames"
227               Display the raw contents of a .debug_frame section.
228
229           "F"
230           "=frame-interp"
231               Display the interpreted contents of a .debug_frame section.
232
233           "g"
234           "=gdb_index"
235               Displays the contents of the .gdb_index and/or .debug_names
236               sections.
237
238           "i"
239           "=info"
240               Displays the contents of the .debug_info section.  Note: the
241               output from this option can also be restricted by the use of
242               the --dwarf-depth and --dwarf-start options.
243
244           "k"
245           "=links"
246               Displays the contents of the .gnu_debuglink and/or
247               .gnu_debugaltlink sections.  Also displays any links to
248               separate dwarf object files (dwo), if they are specified by the
249               DW_AT_GNU_dwo_name or DW_AT_dwo_name attributes in the
250               .debug_info section.
251
252           "K"
253           "=follow-links"
254               Display the contents of any selected debug sections that are
255               found in linked, separate debug info file(s).  This can result
256               in multiple versions of the same debug section being displayed
257               if it exists in more than one file.
258
259               In addition, when displaying DWARF attributes, if a form is
260               found that references the separate debug info file, then the
261               referenced contents will also be displayed.
262
263           "l"
264           "=rawline"
265               Displays the contents of the .debug_line section in a raw
266               format.
267
268           "L"
269           "=decodedline"
270               Displays the interpreted contents of the .debug_line section.
271
272           "m"
273           "=macro"
274               Displays the contents of the .debug_macro and/or .debug_macinfo
275               sections.
276
277           "o"
278           "=loc"
279               Displays the contents of the .debug_loc and/or .debug_loclists
280               sections.
281
282           "O"
283           "=str-offsets"
284               Displays the contents of the .debug_str_offsets section.
285
286           "p"
287           "=pubnames"
288               Displays the contents of the .debug_pubnames and/or
289               .debug_gnu_pubnames sections.
290
291           "r"
292           "=aranges"
293               Displays the contents of the .debug_aranges section.
294
295           "R"
296           "=Ranges"
297               Displays the contents of the .debug_ranges and/or
298               .debug_rnglists sections.
299
300           "s"
301           "=str"
302               Displays the contents of the .debug_str, .debug_line_str and/or
303               .debug_str_offsets sections.
304
305           "t"
306           "=pubtype"
307               Displays the contents of the .debug_pubtypes and/or
308               .debug_gnu_pubtypes sections.
309
310           "T"
311           "=trace_aranges"
312               Displays the contents of the .trace_aranges section.
313
314           "u"
315           "=trace_abbrev"
316               Displays the contents of the .trace_abbrev section.
317
318           "U"
319           "=trace_info"
320               Displays the contents of the .trace_info section.
321
322           Note: displaying the contents of .debug_static_funcs,
323           .debug_static_vars and debug_weaknames sections is not currently
324           supported.
325
326       --dwarf-depth=n
327           Limit the dump of the ".debug_info" section to n children.  This is
328           only useful with --debug-dump=info.  The default is to print all
329           DIEs; the special value 0 for n will also have this effect.
330
331           With a non-zero value for n, DIEs at or deeper than n levels will
332           not be printed.  The range for n is zero-based.
333
334       --dwarf-start=n
335           Print only DIEs beginning with the DIE numbered n.  This is only
336           useful with --debug-dump=info.
337
338           If specified, this option will suppress printing of any header
339           information and all DIEs before the DIE numbered n.  Only siblings
340           and children of the specified DIE will be printed.
341
342           This can be used in conjunction with --dwarf-depth.
343
344       --ctf=section
345           Display the contents of the specified CTF section.  CTF sections
346           themselves contain many subsections, all of which are displayed in
347           order.
348
349       --ctf-parent=section
350           Specify the name of another section from which the CTF dictionary
351           can inherit types.  (If none is specified, we assume the CTF
352           dictionary inherits types from the default-named member of the
353           archive contained within this section.)
354
355       --ctf-symbols=section
356       --ctf-strings=section
357           Specify the name of another section from which the CTF file can
358           inherit strings and symbols.  By default, the ".symtab" and its
359           linked string table are used.
360
361           If either of --ctf-symbols or --ctf-strings is specified, the other
362           must be specified as well.
363
364       -I
365       --histogram
366           Display a histogram of bucket list lengths when displaying the
367           contents of the symbol tables.
368
369       -v
370       --version
371           Display the version number of readelf.
372
373       -W
374       --wide
375           Don't break output lines to fit into 80 columns. By default readelf
376           breaks section header and segment listing lines for 64-bit ELF
377           files, so that they fit into 80 columns. This option causes readelf
378           to print each section header resp. each segment one a single line,
379           which is far more readable on terminals wider than 80 columns.
380
381       -T
382       --silent-truncation
383           Normally when readelf is displaying a symbol name, and it has to
384           truncate the name to fit into an 80 column display, it will add a
385           suffix of "[...]" to the name.  This command line option disables
386           this behaviour, allowing 5 more characters of the name to be
387           displayed and restoring the old behaviour of readelf (prior to
388           release 2.35).
389
390       -H
391       --help
392           Display the command-line options understood by readelf.
393
394       @file
395           Read command-line options from file.  The options read are inserted
396           in place of the original @file option.  If file does not exist, or
397           cannot be read, then the option will be treated literally, and not
398           removed.
399
400           Options in file are separated by whitespace.  A whitespace
401           character may be included in an option by surrounding the entire
402           option in either single or double quotes.  Any character (including
403           a backslash) may be included by prefixing the character to be
404           included with a backslash.  The file may itself contain additional
405           @file options; any such options will be processed recursively.
406

SEE ALSO

408       objdump(1), and the Info entries for binutils.
409
411       Copyright (c) 1991-2020 Free Software Foundation, Inc.
412
413       Permission is granted to copy, distribute and/or modify this document
414       under the terms of the GNU Free Documentation License, Version 1.3 or
415       any later version published by the Free Software Foundation; with no
416       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
417       Texts.  A copy of the license is included in the section entitled "GNU
418       Free Documentation License".
419
420
421
422binutils-2.35                     2020-07-24                        READELF(1)
Impressum