1READELF(1) GNU Development Tools READELF(1)
2
3
4
6 readelf - Displays information about ELF files.
7
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 [-n⎪--notes]
18 [-r⎪--relocs]
19 [-u⎪--unwind]
20 [-d⎪--dynamic]
21 [-V⎪--version-info]
22 [-A⎪--arch-specific]
23 [-D⎪--use-dynamic]
24 [-x <number or name>⎪--hex-dump=<number or name>]
25 [-p <number or name>⎪--string-dump=<number or name>]
26 [-c⎪--archive-index]
27 [-w[lLiaprmfFsoR]⎪
28 --debug-dump[=rawline,=decodedline,=info,=abbrev,=pub‐
29 names,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]]
30 [-I⎪-histogram]
31 [-v⎪--version]
32 [-W⎪--wide]
33 [-H⎪--help]
34 elffile...
35
37 readelf displays information about one or more ELF format object files.
38 The options control what particular information to display.
39
40 elffile... are the object files to be examined. 32-bit and 64-bit ELF
41 files are supported, as are archives containing ELF files.
42
43 This program performs a similar function to objdump but it goes into
44 more detail and it exists independently of the BFD library, so if there
45 is a bug in BFD then readelf will not be affected.
46
48 The long and short forms of options, shown here as alternatives, are
49 equivalent. At least one option besides -v or -H must be given.
50
51 -a
52 --all
53 Equivalent to specifying --file-header, --program-headers, --sec‐
54 tions, --symbols, --relocs, --dynamic, --notes and --version-info.
55
56 -h
57 --file-header
58 Displays the information contained in the ELF header at the start
59 of the file.
60
61 -l
62 --program-headers
63 --segments
64 Displays the information contained in the file's segment headers,
65 if it has any.
66
67 -S
68 --sections
69 --section-headers
70 Displays the information contained in the file's section headers,
71 if it has any.
72
73 -g
74 --section-groups
75 Displays the information contained in the file's section groups, if
76 it has any.
77
78 -t
79 --section-details
80 Displays the detailed section information. Implies -S.
81
82 -s
83 --symbols
84 --syms
85 Displays the entries in symbol table section of the file, if it has
86 one.
87
88 -e
89 --headers
90 Display all the headers in the file. Equivalent to -h -l -S.
91
92 -n
93 --notes
94 Displays the contents of the NOTE segments and/or sections, if any.
95
96 -r
97 --relocs
98 Displays the contents of the file's relocation section, if it has
99 one.
100
101 -u
102 --unwind
103 Displays the contents of the file's unwind section, if it has one.
104 Only the unwind sections for IA64 ELF files are currently sup‐
105 ported.
106
107 -d
108 --dynamic
109 Displays the contents of the file's dynamic section, if it has one.
110
111 -V
112 --version-info
113 Displays the contents of the version sections in the file, it they
114 exist.
115
116 -A
117 --arch-specific
118 Displays architecture-specific information in the file, if there is
119 any.
120
121 -D
122 --use-dynamic
123 When displaying symbols, this option makes readelf use the symbol
124 table in the file's dynamic section, rather than the one in the
125 symbols section.
126
127 -x <number or name>
128 --hex-dump=<number or name>
129 Displays the contents of the indicated section as a hexadecimal
130 dump. A number identifies a particular section by index in the
131 section table; any other string identifies all sections with that
132 name in the object file.
133
134 -p <number or name>
135 --string-dump=<number or name>
136 Displays the contents of the indicated section as printable
137 strings. A number identifies a particular section by index in the
138 section table; any other string identifies all sections with that
139 name in the object file.
140
141 -c
142 --archive-index
143 Displays the file symbol index infomation contained in the header
144 part of binary archives. Performs the same function as the t com‐
145 mand to ar, but without using the BFD library.
146
147 -w[lLiaprmfFsoR]
148 --debug-dump[=rawline,=decodedline,=info,=abbrev,=pub‐
149 names,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]
150 Displays the contents of the debug sections in the file, if any are
151 present. If one of the optional letters or words follows the
152 switch then only data found in those specific sections will be
153 dumped.
154
155 Note: the =decodedline option will display the interpreted contents
156 of a .debug_line section whereas the =rawline option dumps the con‐
157 tents in a raw format.
158
159 -I
160 --histogram
161 Display a histogram of bucket list lengths when displaying the con‐
162 tents of the symbol tables.
163
164 -v
165 --version
166 Display the version number of readelf.
167
168 -W
169 --wide
170 Don't break output lines to fit into 80 columns. By default readelf
171 breaks section header and segment listing lines for 64-bit ELF
172 files, so that they fit into 80 columns. This option causes readelf
173 to print each section header resp. each segment one a single line,
174 which is far more readable on terminals wider than 80 columns.
175
176 -H
177 --help
178 Display the command line options understood by readelf.
179
180 @file
181 Read command-line options from file. The options read are inserted
182 in place of the original @file option. If file does not exist, or
183 cannot be read, then the option will be treated literally, and not
184 removed.
185
186 Options in file are separated by whitespace. A whitespace charac‐
187 ter may be included in an option by surrounding the entire option
188 in either single or double quotes. Any character (including a
189 backslash) may be included by prefixing the character to be
190 included with a backslash. The file may itself contain additional
191 @file options; any such options will be processed recursively.
192
194 objdump(1), and the Info entries for binutils.
195
197 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
198 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
199 Foundation, Inc.
200
201 Permission is granted to copy, distribute and/or modify this document
202 under the terms of the GNU Free Documentation License, Version 1.2 or
203 any later version published by the Free Software Foundation; with no
204 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
205 Texts. A copy of the license is included in the section entitled "GNU
206 Free Documentation License".
207
208
209
210binutils-2.18.90 2008-09-10 READELF(1)