Merge branch 'vendor/BMAKE'
[dragonfly.git] / contrib / binutils-2.21 / binutils / doc / readelf.1
1 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
29 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
30 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
31 .\" nothing in troff, for use with C<>.
32 .tr \(*W-
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" Escape single quotes in literal strings from groff's Unicode transform.
52 .ie \n(.g .ds Aq \(aq
53 .el       .ds Aq '
54 .\"
55 .\" If the F register is turned on, we'll generate index entries on stderr for
56 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
57 .\" entries marked with X<> in POD.  Of course, you'll have to process the
58 .\" output yourself in some meaningful fashion.
59 .ie \nF \{\
60 .    de IX
61 .    tm Index:\\$1\t\\n%\t"\\$2"
62 ..
63 .    nr % 0
64 .    rr F
65 .\}
66 .el \{\
67 .    de IX
68 ..
69 .\}
70 .\"
71 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
72 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
73 .    \" fudge factors for nroff and troff
74 .if n \{\
75 .    ds #H 0
76 .    ds #V .8m
77 .    ds #F .3m
78 .    ds #[ \f1
79 .    ds #] \fP
80 .\}
81 .if t \{\
82 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
83 .    ds #V .6m
84 .    ds #F 0
85 .    ds #[ \&
86 .    ds #] \&
87 .\}
88 .    \" simple accents for nroff and troff
89 .if n \{\
90 .    ds ' \&
91 .    ds ` \&
92 .    ds ^ \&
93 .    ds , \&
94 .    ds ~ ~
95 .    ds /
96 .\}
97 .if t \{\
98 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
99 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
100 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
101 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
102 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
103 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
104 .\}
105 .    \" troff and (daisy-wheel) nroff accents
106 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
107 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
108 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
109 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
110 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
111 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
112 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
113 .ds ae a\h'-(\w'a'u*4/10)'e
114 .ds Ae A\h'-(\w'A'u*4/10)'E
115 .    \" corrections for vroff
116 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
117 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
118 .    \" for low resolution devices (crt and lpr)
119 .if \n(.H>23 .if \n(.V>19 \
120 \{\
121 .    ds : e
122 .    ds 8 ss
123 .    ds o a
124 .    ds d- d\h'-1'\(ga
125 .    ds D- D\h'-1'\(hy
126 .    ds th \o'bp'
127 .    ds Th \o'LP'
128 .    ds ae ae
129 .    ds Ae AE
130 .\}
131 .rm #[ #] #H #V #F C
132 .\" ========================================================================
133 .\"
134 .IX Title "READELF 1"
135 .TH READELF 1 "2011-06-27" "binutils-2.21.1" "GNU Development Tools"
136 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
137 .\" way too many mistakes in technical documents.
138 .if n .ad l
139 .nh
140 .SH "NAME"
141 readelf \- Displays information about ELF files.
142 .SH "SYNOPSIS"
143 .IX Header "SYNOPSIS"
144 readelf [\fB\-a\fR|\fB\-\-all\fR]
145         [\fB\-h\fR|\fB\-\-file\-header\fR]
146         [\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR]
147         [\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
148         [\fB\-g\fR|\fB\-\-section\-groups\fR]
149         [\fB\-t\fR|\fB\-\-section\-details\fR]
150         [\fB\-e\fR|\fB\-\-headers\fR]
151         [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
152         [\fB\-\-dyn\-syms\fR]
153         [\fB\-n\fR|\fB\-\-notes\fR]
154         [\fB\-r\fR|\fB\-\-relocs\fR]
155         [\fB\-u\fR|\fB\-\-unwind\fR]
156         [\fB\-d\fR|\fB\-\-dynamic\fR]
157         [\fB\-V\fR|\fB\-\-version\-info\fR]
158         [\fB\-A\fR|\fB\-\-arch\-specific\fR]
159         [\fB\-D\fR|\fB\-\-use\-dynamic\fR]
160         [\fB\-x\fR <number or name>|\fB\-\-hex\-dump=\fR<number or name>]
161         [\fB\-p\fR <number or name>|\fB\-\-string\-dump=\fR<number or name>]
162         [\fB\-R\fR <number or name>|\fB\-\-relocated\-dump=\fR<number or name>]
163         [\fB\-c\fR|\fB\-\-archive\-index\fR]
164         [\fB\-w[lLiaprmfFsoRt]\fR|
165          \fB\-\-debug\-dump\fR[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]]
166         [\fB\-I\fR|\fB\-\-histogram\fR]
167         [\fB\-v\fR|\fB\-\-version\fR]
168         [\fB\-W\fR|\fB\-\-wide\fR]
169         [\fB\-H\fR|\fB\-\-help\fR]
170         \fIelffile\fR...
171 .SH "DESCRIPTION"
172 .IX Header "DESCRIPTION"
173 \&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object
174 files.  The options control what particular information to display.
175 .PP
176 \&\fIelffile\fR... are the object files to be examined.  32\-bit and
177 64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files.
178 .PP
179 This program performs a similar function to \fBobjdump\fR but it
180 goes into more detail and it exists independently of the \s-1BFD\s0
181 library, so if there is a bug in \s-1BFD\s0 then readelf will not be
182 affected.
183 .SH "OPTIONS"
184 .IX Header "OPTIONS"
185 The long and short forms of options, shown here as alternatives, are
186 equivalent.  At least one option besides \fB\-v\fR or \fB\-H\fR must be
187 given.
188 .IP "\fB\-a\fR" 4
189 .IX Item "-a"
190 .PD 0
191 .IP "\fB\-\-all\fR" 4
192 .IX Item "--all"
193 .PD
194 Equivalent to specifying \fB\-\-file\-header\fR,
195 \&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR,
196 \&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR and
197 \&\fB\-\-version\-info\fR.
198 .IP "\fB\-h\fR" 4
199 .IX Item "-h"
200 .PD 0
201 .IP "\fB\-\-file\-header\fR" 4
202 .IX Item "--file-header"
203 .PD
204 Displays the information contained in the \s-1ELF\s0 header at the start of the
205 file.
206 .IP "\fB\-l\fR" 4
207 .IX Item "-l"
208 .PD 0
209 .IP "\fB\-\-program\-headers\fR" 4
210 .IX Item "--program-headers"
211 .IP "\fB\-\-segments\fR" 4
212 .IX Item "--segments"
213 .PD
214 Displays the information contained in the file's segment headers, if it
215 has any.
216 .IP "\fB\-S\fR" 4
217 .IX Item "-S"
218 .PD 0
219 .IP "\fB\-\-sections\fR" 4
220 .IX Item "--sections"
221 .IP "\fB\-\-section\-headers\fR" 4
222 .IX Item "--section-headers"
223 .PD
224 Displays the information contained in the file's section headers, if it
225 has any.
226 .IP "\fB\-g\fR" 4
227 .IX Item "-g"
228 .PD 0
229 .IP "\fB\-\-section\-groups\fR" 4
230 .IX Item "--section-groups"
231 .PD
232 Displays the information contained in the file's section groups, if it
233 has any.
234 .IP "\fB\-t\fR" 4
235 .IX Item "-t"
236 .PD 0
237 .IP "\fB\-\-section\-details\fR" 4
238 .IX Item "--section-details"
239 .PD
240 Displays the detailed section information. Implies \fB\-S\fR.
241 .IP "\fB\-s\fR" 4
242 .IX Item "-s"
243 .PD 0
244 .IP "\fB\-\-symbols\fR" 4
245 .IX Item "--symbols"
246 .IP "\fB\-\-syms\fR" 4
247 .IX Item "--syms"
248 .PD
249 Displays the entries in symbol table section of the file, if it has one.
250 .IP "\fB\-\-dyn\-syms\fR" 4
251 .IX Item "--dyn-syms"
252 Displays the entries in dynamic symbol table section of the file, if it
253 has one.
254 .IP "\fB\-e\fR" 4
255 .IX Item "-e"
256 .PD 0
257 .IP "\fB\-\-headers\fR" 4
258 .IX Item "--headers"
259 .PD
260 Display all the headers in the file.  Equivalent to \fB\-h \-l \-S\fR.
261 .IP "\fB\-n\fR" 4
262 .IX Item "-n"
263 .PD 0
264 .IP "\fB\-\-notes\fR" 4
265 .IX Item "--notes"
266 .PD
267 Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any.
268 .IP "\fB\-r\fR" 4
269 .IX Item "-r"
270 .PD 0
271 .IP "\fB\-\-relocs\fR" 4
272 .IX Item "--relocs"
273 .PD
274 Displays the contents of the file's relocation section, if it has one.
275 .IP "\fB\-u\fR" 4
276 .IX Item "-u"
277 .PD 0
278 .IP "\fB\-\-unwind\fR" 4
279 .IX Item "--unwind"
280 .PD
281 Displays the contents of the file's unwind section, if it has one.  Only
282 the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files, as well as \s-1ARM\s0 unwind tables
283 (\f(CW\*(C`.ARM.exidx\*(C'\fR / \f(CW\*(C`.ARM.extab\*(C'\fR) are currently supported.
284 .IP "\fB\-d\fR" 4
285 .IX Item "-d"
286 .PD 0
287 .IP "\fB\-\-dynamic\fR" 4
288 .IX Item "--dynamic"
289 .PD
290 Displays the contents of the file's dynamic section, if it has one.
291 .IP "\fB\-V\fR" 4
292 .IX Item "-V"
293 .PD 0
294 .IP "\fB\-\-version\-info\fR" 4
295 .IX Item "--version-info"
296 .PD
297 Displays the contents of the version sections in the file, it they
298 exist.
299 .IP "\fB\-A\fR" 4
300 .IX Item "-A"
301 .PD 0
302 .IP "\fB\-\-arch\-specific\fR" 4
303 .IX Item "--arch-specific"
304 .PD
305 Displays architecture-specific information in the file, if there
306 is any.
307 .IP "\fB\-D\fR" 4
308 .IX Item "-D"
309 .PD 0
310 .IP "\fB\-\-use\-dynamic\fR" 4
311 .IX Item "--use-dynamic"
312 .PD
313 When displaying symbols, this option makes \fBreadelf\fR use the
314 symbol hash tables in the file's dynamic section, rather than the
315 symbol table sections.
316 .IP "\fB\-x <number or name>\fR" 4
317 .IX Item "-x <number or name>"
318 .PD 0
319 .IP "\fB\-\-hex\-dump=<number or name>\fR" 4
320 .IX Item "--hex-dump=<number or name>"
321 .PD
322 Displays the contents of the indicated section as a hexadecimal bytes.
323 A number identifies a particular section by index in the section table;
324 any other string identifies all sections with that name in the object file.
325 .IP "\fB\-R <number or name>\fR" 4
326 .IX Item "-R <number or name>"
327 .PD 0
328 .IP "\fB\-\-relocated\-dump=<number or name>\fR" 4
329 .IX Item "--relocated-dump=<number or name>"
330 .PD
331 Displays the contents of the indicated section as a hexadecimal
332 bytes.  A number identifies a particular section by index in the
333 section table; any other string identifies all sections with that name
334 in the object file.  The contents of the section will be relocated
335 before they are displayed.
336 .IP "\fB\-p <number or name>\fR" 4
337 .IX Item "-p <number or name>"
338 .PD 0
339 .IP "\fB\-\-string\-dump=<number or name>\fR" 4
340 .IX Item "--string-dump=<number or name>"
341 .PD
342 Displays the contents of the indicated section as printable strings.
343 A number identifies a particular section by index in the section table;
344 any other string identifies all sections with that name in the object file.
345 .IP "\fB\-c\fR" 4
346 .IX Item "-c"
347 .PD 0
348 .IP "\fB\-\-archive\-index\fR" 4
349 .IX Item "--archive-index"
350 .PD
351 Displays the file symbol index infomation contained in the header part
352 of binary archives.  Performs the same function as the \fBt\fR
353 command to \fBar\fR, but without using the \s-1BFD\s0 library.
354 .IP "\fB\-w[lLiaprmfFsoRt]\fR" 4
355 .IX Item "-w[lLiaprmfFsoRt]"
356 .PD 0
357 .IP "\fB\-\-debug\-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]\fR" 4
358 .IX Item "--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]"
359 .PD
360 Displays the contents of the debug sections in the file, if any are
361 present.  If one of the optional letters or words follows the switch
362 then only data found in those specific sections will be dumped.
363 .Sp
364 Note that there is no single letter option to display the content of
365 trace sections or .gdb_index.
366 .Sp
367 Note: the \fB=decodedline\fR option will display the interpreted
368 contents of a .debug_line section whereas the \fB=rawline\fR option
369 dumps the contents in a raw format.
370 .Sp
371 Note: the \fB=frames\-interp\fR option will display the interpreted
372 contents of a .debug_frame section whereas the \fB=frames\fR option
373 dumps the contents in a raw format.
374 .IP "\fB\-I\fR" 4
375 .IX Item "-I"
376 .PD 0
377 .IP "\fB\-\-histogram\fR" 4
378 .IX Item "--histogram"
379 .PD
380 Display a histogram of bucket list lengths when displaying the contents
381 of the symbol tables.
382 .IP "\fB\-v\fR" 4
383 .IX Item "-v"
384 .PD 0
385 .IP "\fB\-\-version\fR" 4
386 .IX Item "--version"
387 .PD
388 Display the version number of readelf.
389 .IP "\fB\-W\fR" 4
390 .IX Item "-W"
391 .PD 0
392 .IP "\fB\-\-wide\fR" 4
393 .IX Item "--wide"
394 .PD
395 Don't break output lines to fit into 80 columns. By default
396 \&\fBreadelf\fR breaks section header and segment listing lines for
397 64\-bit \s-1ELF\s0 files, so that they fit into 80 columns. This option causes
398 \&\fBreadelf\fR to print each section header resp. each segment one a
399 single line, which is far more readable on terminals wider than 80 columns.
400 .IP "\fB\-H\fR" 4
401 .IX Item "-H"
402 .PD 0
403 .IP "\fB\-\-help\fR" 4
404 .IX Item "--help"
405 .PD
406 Display the command line options understood by \fBreadelf\fR.
407 .IP "\fB@\fR\fIfile\fR" 4
408 .IX Item "@file"
409 Read command-line options from \fIfile\fR.  The options read are
410 inserted in place of the original @\fIfile\fR option.  If \fIfile\fR
411 does not exist, or cannot be read, then the option will be treated
412 literally, and not removed.
413 .Sp
414 Options in \fIfile\fR are separated by whitespace.  A whitespace
415 character may be included in an option by surrounding the entire
416 option in either single or double quotes.  Any character (including a
417 backslash) may be included by prefixing the character to be included
418 with a backslash.  The \fIfile\fR may itself contain additional
419 @\fIfile\fR options; any such options will be processed recursively.
420 .SH "SEE ALSO"
421 .IX Header "SEE ALSO"
422 \&\fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
423 .SH "COPYRIGHT"
424 .IX Header "COPYRIGHT"
425 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
426 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
427 Free Software Foundation, Inc.
428 .PP
429 Permission is granted to copy, distribute and/or modify this document
430 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
431 or any later version published by the Free Software Foundation;
432 with no Invariant Sections, with no Front-Cover Texts, and with no
433 Back-Cover Texts.  A copy of the license is included in the
434 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".