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

NAME

6       readelf - Displays 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               [-x <number or name>|--hex-dump=<number or name>]
26               [-p <number or name>|--string-dump=<number or name>]
27               [-R <number or name>|--relocated-dump=<number or name>]
28               [-z|--decompress]
29               [-c|--archive-index]
30               [-w[lLiaprmfFsoRtUuTgAckK]|
31                --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]]
32               [--dwarf-depth=n]
33               [--dwarf-start=n]
34               [-I|--histogram]
35               [-v|--version]
36               [-W|--wide]
37               [-H|--help]
38               elffile...
39

DESCRIPTION

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

OPTIONS

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

SEE ALSO

358       objdump(1), and the Info entries for binutils.
359
361       Copyright (c) 1991-2018 Free Software Foundation, Inc.
362
363       Permission is granted to copy, distribute and/or modify this document
364       under the terms of the GNU Free Documentation License, Version 1.3 or
365       any later version published by the Free Software Foundation; with no
366       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
367       Texts.  A copy of the license is included in the section entitled "GNU
368       Free Documentation License".
369
370
371
372binutils-2.30.90                  2018-07-09                        READELF(1)
Impressum