Merge branch 'vendor/TNFTP'
[dragonfly.git] / contrib / binutils-2.17 / binutils / doc / readelf.1
1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
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 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .\"
67 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
68 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
69 .    \" fudge factors for nroff and troff
70 .if n \{\
71 .    ds #H 0
72 .    ds #V .8m
73 .    ds #F .3m
74 .    ds #[ \f1
75 .    ds #] \fP
76 .\}
77 .if t \{\
78 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
79 .    ds #V .6m
80 .    ds #F 0
81 .    ds #[ \&
82 .    ds #] \&
83 .\}
84 .    \" simple accents for nroff and troff
85 .if n \{\
86 .    ds ' \&
87 .    ds ` \&
88 .    ds ^ \&
89 .    ds , \&
90 .    ds ~ ~
91 .    ds /
92 .\}
93 .if t \{\
94 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
95 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
96 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
97 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
98 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
99 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
100 .\}
101 .    \" troff and (daisy-wheel) nroff accents
102 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
103 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
104 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
105 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
106 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
107 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
108 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
109 .ds ae a\h'-(\w'a'u*4/10)'e
110 .ds Ae A\h'-(\w'A'u*4/10)'E
111 .    \" corrections for vroff
112 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
113 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
114 .    \" for low resolution devices (crt and lpr)
115 .if \n(.H>23 .if \n(.V>19 \
116 \{\
117 .    ds : e
118 .    ds 8 ss
119 .    ds o a
120 .    ds d- d\h'-1'\(ga
121 .    ds D- D\h'-1'\(hy
122 .    ds th \o'bp'
123 .    ds Th \o'LP'
124 .    ds ae ae
125 .    ds Ae AE
126 .\}
127 .rm #[ #] #H #V #F C
128 .\" ========================================================================
129 .\"
130 .IX Title "READELF 1"
131 .TH READELF 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
132 .SH "NAME"
133 readelf \- Displays information about ELF files.
134 .SH "SYNOPSIS"
135 .IX Header "SYNOPSIS"
136 readelf [\fB\-a\fR|\fB\-\-all\fR] 
137         [\fB\-h\fR|\fB\-\-file\-header\fR]
138         [\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR]
139         [\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
140         [\fB\-g\fR|\fB\-\-section\-groups\fR]
141         [\fB\-t\fR|\fB\-\-section\-details\fR]
142         [\fB\-e\fR|\fB\-\-headers\fR]
143         [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
144         [\fB\-n\fR|\fB\-\-notes\fR]
145         [\fB\-r\fR|\fB\-\-relocs\fR]
146         [\fB\-u\fR|\fB\-\-unwind\fR]
147         [\fB\-d\fR|\fB\-\-dynamic\fR]
148         [\fB\-V\fR|\fB\-\-version\-info\fR]
149         [\fB\-A\fR|\fB\-\-arch\-specific\fR]
150         [\fB\-D\fR|\fB\-\-use\-dynamic\fR]
151         [\fB\-x\fR <number or name>|\fB\-\-hex\-dump=\fR<number or name>]
152         [\fB\-w[liaprmfFsoR]\fR|
153          \fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges]]
154         [\fB\-I\fR|\fB\-histogram\fR]
155         [\fB\-v\fR|\fB\-\-version\fR]
156         [\fB\-W\fR|\fB\-\-wide\fR]
157         [\fB\-H\fR|\fB\-\-help\fR]
158         \fIelffile\fR...
159 .SH "DESCRIPTION"
160 .IX Header "DESCRIPTION"
161 \&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object
162 files.  The options control what particular information to display.
163 .PP
164 \&\fIelffile\fR... are the object files to be examined.  32\-bit and
165 64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files.
166 .PP
167 This program performs a similar function to \fBobjdump\fR but it
168 goes into more detail and it exists independently of the \s-1BFD\s0
169 library, so if there is a bug in \s-1BFD\s0 then readelf will not be
170 affected.
171 .SH "OPTIONS"
172 .IX Header "OPTIONS"
173 The long and short forms of options, shown here as alternatives, are
174 equivalent.  At least one option besides \fB\-v\fR or \fB\-H\fR must be
175 given. 
176 .IP "\fB\-a\fR" 4
177 .IX Item "-a"
178 .PD 0
179 .IP "\fB\-\-all\fR" 4
180 .IX Item "--all"
181 .PD
182 Equivalent to specifiying \fB\-\-file\-header\fR,
183 \&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR,
184 \&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR and
185 \&\fB\-\-version\-info\fR. 
186 .IP "\fB\-h\fR" 4
187 .IX Item "-h"
188 .PD 0
189 .IP "\fB\-\-file\-header\fR" 4
190 .IX Item "--file-header"
191 .PD
192 Displays the information contained in the \s-1ELF\s0 header at the start of the
193 file.
194 .IP "\fB\-l\fR" 4
195 .IX Item "-l"
196 .PD 0
197 .IP "\fB\-\-program\-headers\fR" 4
198 .IX Item "--program-headers"
199 .IP "\fB\-\-segments\fR" 4
200 .IX Item "--segments"
201 .PD
202 Displays the information contained in the file's segment headers, if it
203 has any.
204 .IP "\fB\-S\fR" 4
205 .IX Item "-S"
206 .PD 0
207 .IP "\fB\-\-sections\fR" 4
208 .IX Item "--sections"
209 .IP "\fB\-\-section\-headers\fR" 4
210 .IX Item "--section-headers"
211 .PD
212 Displays the information contained in the file's section headers, if it
213 has any.
214 .IP "\fB\-g\fR" 4
215 .IX Item "-g"
216 .PD 0
217 .IP "\fB\-\-section\-groups\fR" 4
218 .IX Item "--section-groups"
219 .PD
220 Displays the information contained in the file's section groups, if it
221 has any.
222 .IP "\fB\-t\fR" 4
223 .IX Item "-t"
224 .PD 0
225 .IP "\fB\-\-section\-details\fR" 4
226 .IX Item "--section-details"
227 .PD
228 Displays the detailed section information. Implies \fB\-S\fR.
229 .IP "\fB\-s\fR" 4
230 .IX Item "-s"
231 .PD 0
232 .IP "\fB\-\-symbols\fR" 4
233 .IX Item "--symbols"
234 .IP "\fB\-\-syms\fR" 4
235 .IX Item "--syms"
236 .PD
237 Displays the entries in symbol table section of the file, if it has one.
238 .IP "\fB\-e\fR" 4
239 .IX Item "-e"
240 .PD 0
241 .IP "\fB\-\-headers\fR" 4
242 .IX Item "--headers"
243 .PD
244 Display all the headers in the file.  Equivalent to \fB\-h \-l \-S\fR.
245 .IP "\fB\-n\fR" 4
246 .IX Item "-n"
247 .PD 0
248 .IP "\fB\-\-notes\fR" 4
249 .IX Item "--notes"
250 .PD
251 Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any.
252 .IP "\fB\-r\fR" 4
253 .IX Item "-r"
254 .PD 0
255 .IP "\fB\-\-relocs\fR" 4
256 .IX Item "--relocs"
257 .PD
258 Displays the contents of the file's relocation section, if it has one.
259 .IP "\fB\-u\fR" 4
260 .IX Item "-u"
261 .PD 0
262 .IP "\fB\-\-unwind\fR" 4
263 .IX Item "--unwind"
264 .PD
265 Displays the contents of the file's unwind section, if it has one.  Only
266 the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
267 .IP "\fB\-d\fR" 4
268 .IX Item "-d"
269 .PD 0
270 .IP "\fB\-\-dynamic\fR" 4
271 .IX Item "--dynamic"
272 .PD
273 Displays the contents of the file's dynamic section, if it has one.
274 .IP "\fB\-V\fR" 4
275 .IX Item "-V"
276 .PD 0
277 .IP "\fB\-\-version\-info\fR" 4
278 .IX Item "--version-info"
279 .PD
280 Displays the contents of the version sections in the file, it they
281 exist.
282 .IP "\fB\-A\fR" 4
283 .IX Item "-A"
284 .PD 0
285 .IP "\fB\-\-arch\-specific\fR" 4
286 .IX Item "--arch-specific"
287 .PD
288 Displays architecture-specific information in the file, if there
289 is any.
290 .IP "\fB\-D\fR" 4
291 .IX Item "-D"
292 .PD 0
293 .IP "\fB\-\-use\-dynamic\fR" 4
294 .IX Item "--use-dynamic"
295 .PD
296 When displaying symbols, this option makes \fBreadelf\fR use the
297 symbol table in the file's dynamic section, rather than the one in the
298 symbols section.
299 .IP "\fB\-x <number or name>\fR" 4
300 .IX Item "-x <number or name>"
301 .PD 0
302 .IP "\fB\-\-hex\-dump=<number or name>\fR" 4
303 .IX Item "--hex-dump=<number or name>"
304 .PD
305 Displays the contents of the indicated section as a hexadecimal dump.
306 A number identifies a particular section by index in the section table;
307 any other string identifies all sections with that name in the object file.
308 .IP "\fB\-w[liaprmfFsoR]\fR" 4
309 .IX Item "-w[liaprmfFsoR]"
310 .PD 0
311 .IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges]\fR" 4
312 .IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]"
313 .PD
314 Displays the contents of the debug sections in the file, if any are
315 present.  If one of the optional letters or words follows the switch
316 then only data found in those specific sections will be dumped.
317 .IP "\fB\-I\fR" 4
318 .IX Item "-I"
319 .PD 0
320 .IP "\fB\-\-histogram\fR" 4
321 .IX Item "--histogram"
322 .PD
323 Display a histogram of bucket list lengths when displaying the contents
324 of the symbol tables.
325 .IP "\fB\-v\fR" 4
326 .IX Item "-v"
327 .PD 0
328 .IP "\fB\-\-version\fR" 4
329 .IX Item "--version"
330 .PD
331 Display the version number of readelf.
332 .IP "\fB\-W\fR" 4
333 .IX Item "-W"
334 .PD 0
335 .IP "\fB\-\-wide\fR" 4
336 .IX Item "--wide"
337 .PD
338 Don't break output lines to fit into 80 columns. By default
339 \&\fBreadelf\fR breaks section header and segment listing lines for
340 64\-bit \s-1ELF\s0 files, so that they fit into 80 columns. This option causes
341 \&\fBreadelf\fR to print each section header resp. each segment one a
342 single line, which is far more readable on terminals wider than 80 columns.
343 .IP "\fB\-H\fR" 4
344 .IX Item "-H"
345 .PD 0
346 .IP "\fB\-\-help\fR" 4
347 .IX Item "--help"
348 .PD
349 Display the command line options understood by \fBreadelf\fR.
350 .IP "\fB@\fR\fIfile\fR" 4
351 .IX Item "@file"
352 Read command-line options from \fIfile\fR.  The options read are
353 inserted in place of the original @\fIfile\fR option.  If \fIfile\fR
354 does not exist, or cannot be read, then the option will be treated
355 literally, and not removed.  
356 .Sp
357 Options in \fIfile\fR are separated by whitespace.  A whitespace
358 character may be included in an option by surrounding the entire
359 option in either single or double quotes.  Any character (including a
360 backslash) may be included by prefixing the character to be included
361 with a backslash.  The \fIfile\fR may itself contain additional
362 @\fIfile\fR options; any such options will be processed recursively.
363 .SH "SEE ALSO"
364 .IX Header "SEE ALSO"
365 \&\fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
366 .SH "COPYRIGHT"
367 .IX Header "COPYRIGHT"
368 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
369 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
370 .PP
371 Permission is granted to copy, distribute and/or modify this document
372 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
373 or any later version published by the Free Software Foundation;
374 with no Invariant Sections, with no Front-Cover Texts, and with no
375 Back-Cover Texts.  A copy of the license is included in the
376 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".