• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2013.11/share/doc/arm-arm-none-eabi/html/binutils.html/
1<html lang="en">
2<head>
3<title>readelf - GNU Binary Utilities</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="GNU Binary Utilities">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="index.html#Top">
8<link rel="prev" href="dlltool.html#dlltool" title="dlltool">
9<link rel="next" href="elfedit.html#elfedit" title="elfedit">
10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11<!--
12Copyright (C) 1991-2013 Free Software Foundation, Inc.
13
14Permission is granted to copy, distribute and/or modify this document
15under the terms of the GNU Free Documentation License, Version 1.3
16or any later version published by the Free Software Foundation;
17with no Invariant Sections, with no Front-Cover Texts, and with no
18Back-Cover Texts.  A copy of the license is included in the
19section entitled ``GNU Free Documentation License''.
20
21-->
22<meta http-equiv="Content-Style-Type" content="text/css">
23<style type="text/css"><!--
24  pre.display { font-family:inherit }
25  pre.format  { font-family:inherit }
26  pre.smalldisplay { font-family:inherit; font-size:smaller }
27  pre.smallformat  { font-family:inherit; font-size:smaller }
28  pre.smallexample { font-size:smaller }
29  pre.smalllisp    { font-size:smaller }
30  span.sc    { font-variant:small-caps }
31  span.roman { font-family:serif; font-weight:normal; } 
32  span.sansserif { font-family:sans-serif; font-weight:normal; } 
33--></style>
34<link rel="stylesheet" type="text/css" href="../cs.css">
35</head>
36<body>
37<div class="node">
38<a name="readelf"></a>
39<p>
40Next:&nbsp;<a rel="next" accesskey="n" href="elfedit.html#elfedit">elfedit</a>,
41Previous:&nbsp;<a rel="previous" accesskey="p" href="dlltool.html#dlltool">dlltool</a>,
42Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
43<hr>
44</div>
45
46<h2 class="chapter">15 readelf</h2>
47
48<p><a name="index-ELF-file-information-147"></a><a name="index-readelf-148"></a>
49<!-- man title readelf Displays information about ELF files. -->
50
51<pre class="smallexample">     <!-- man begin SYNOPSIS readelf -->
52     readelf [<samp><span class="option">-a</span></samp>|<samp><span class="option">--all</span></samp>]
53             [<samp><span class="option">-h</span></samp>|<samp><span class="option">--file-header</span></samp>]
54             [<samp><span class="option">-l</span></samp>|<samp><span class="option">--program-headers</span></samp>|<samp><span class="option">--segments</span></samp>]
55             [<samp><span class="option">-S</span></samp>|<samp><span class="option">--section-headers</span></samp>|<samp><span class="option">--sections</span></samp>]
56             [<samp><span class="option">-g</span></samp>|<samp><span class="option">--section-groups</span></samp>]
57             [<samp><span class="option">-t</span></samp>|<samp><span class="option">--section-details</span></samp>]
58             [<samp><span class="option">-e</span></samp>|<samp><span class="option">--headers</span></samp>]
59             [<samp><span class="option">-s</span></samp>|<samp><span class="option">--syms</span></samp>|<samp><span class="option">--symbols</span></samp>]
60             [<samp><span class="option">--dyn-syms</span></samp>]
61             [<samp><span class="option">-n</span></samp>|<samp><span class="option">--notes</span></samp>]
62             [<samp><span class="option">-r</span></samp>|<samp><span class="option">--relocs</span></samp>]
63             [<samp><span class="option">-u</span></samp>|<samp><span class="option">--unwind</span></samp>]
64             [<samp><span class="option">-d</span></samp>|<samp><span class="option">--dynamic</span></samp>]
65             [<samp><span class="option">-V</span></samp>|<samp><span class="option">--version-info</span></samp>]
66             [<samp><span class="option">-A</span></samp>|<samp><span class="option">--arch-specific</span></samp>]
67             [<samp><span class="option">-D</span></samp>|<samp><span class="option">--use-dynamic</span></samp>]
68             [<samp><span class="option">-x</span></samp> &lt;number or name&gt;|<samp><span class="option">--hex-dump=</span></samp>&lt;number or name&gt;]
69             [<samp><span class="option">-p</span></samp> &lt;number or name&gt;|<samp><span class="option">--string-dump=</span></samp>&lt;number or name&gt;]
70             [<samp><span class="option">-R</span></samp> &lt;number or name&gt;|<samp><span class="option">--relocated-dump=</span></samp>&lt;number or name&gt;]
71             [<samp><span class="option">-c</span></samp>|<samp><span class="option">--archive-index</span></samp>]
72             [<samp><span class="option">-w[lLiaprmfFsoRt]</span></samp>|
73              <samp><span class="option">--debug-dump</span></samp>[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]]
74             [<samp><span class="option">--dwarf-depth=</span><var>n</var></samp>]
75             [<samp><span class="option">--dwarf-start=</span><var>n</var></samp>]
76             [<samp><span class="option">-I</span></samp>|<samp><span class="option">--histogram</span></samp>]
77             [<samp><span class="option">-v</span></samp>|<samp><span class="option">--version</span></samp>]
78             [<samp><span class="option">-W</span></samp>|<samp><span class="option">--wide</span></samp>]
79             [<samp><span class="option">-H</span></samp>|<samp><span class="option">--help</span></samp>]
80             <var>elffile</var>...
81     <!-- man end -->
82</pre>
83   <!-- man begin DESCRIPTION readelf -->
84   <p><samp><span class="command">readelf</span></samp> displays information about one or more ELF format object
85files.  The options control what particular information to display.
86
87   <p><var>elffile</var><small class="dots">...</small> are the object files to be examined.  32-bit and
8864-bit ELF files are supported, as are archives containing ELF files.
89
90   <p>This program performs a similar function to <samp><span class="command">objdump</span></samp> but it
91goes into more detail and it exists independently of the <span class="sc">bfd</span>
92library, so if there is a bug in <span class="sc">bfd</span> then readelf will not be
93affected.
94
95<!-- man end -->
96<!-- man begin OPTIONS readelf -->
97   <p>The long and short forms of options, shown here as alternatives, are
98equivalent.  At least one option besides &lsquo;<samp><span class="samp">-v</span></samp>&rsquo; or &lsquo;<samp><span class="samp">-H</span></samp>&rsquo; must be
99given.
100
101     <dl>
102<dt><samp><span class="env">-a</span></samp><dt><samp><span class="env">--all</span></samp><dd>Equivalent to specifying <samp><span class="option">--file-header</span></samp>,
103<samp><span class="option">--program-headers</span></samp>, <samp><span class="option">--sections</span></samp>, <samp><span class="option">--symbols</span></samp>,
104<samp><span class="option">--relocs</span></samp>, <samp><span class="option">--dynamic</span></samp>, <samp><span class="option">--notes</span></samp> and
105<samp><span class="option">--version-info</span></samp>.
106
107     <br><dt><samp><span class="env">-h</span></samp><dt><samp><span class="env">--file-header</span></samp><dd><a name="index-ELF-file-header-information-149"></a>Displays the information contained in the ELF header at the start of the
108file.
109
110     <br><dt><samp><span class="env">-l</span></samp><dt><samp><span class="env">--program-headers</span></samp><dt><samp><span class="env">--segments</span></samp><dd><a name="index-ELF-program-header-information-150"></a><a name="index-ELF-segment-information-151"></a>Displays the information contained in the file's segment headers, if it
111has any.
112
113     <br><dt><samp><span class="env">-S</span></samp><dt><samp><span class="env">--sections</span></samp><dt><samp><span class="env">--section-headers</span></samp><dd><a name="index-ELF-section-information-152"></a>Displays the information contained in the file's section headers, if it
114has any.
115
116     <br><dt><samp><span class="env">-g</span></samp><dt><samp><span class="env">--section-groups</span></samp><dd><a name="index-ELF-section-group-information-153"></a>Displays the information contained in the file's section groups, if it
117has any.
118
119     <br><dt><samp><span class="env">-t</span></samp><dt><samp><span class="env">--section-details</span></samp><dd><a name="index-ELF-section-information-154"></a>Displays the detailed section information. Implies <samp><span class="option">-S</span></samp>.
120
121     <br><dt><samp><span class="env">-s</span></samp><dt><samp><span class="env">--symbols</span></samp><dt><samp><span class="env">--syms</span></samp><dd><a name="index-ELF-symbol-table-information-155"></a>Displays the entries in symbol table section of the file, if it has one.
122
123     <br><dt><samp><span class="env">--dyn-syms</span></samp><dd><a name="index-ELF-dynamic-symbol-table-information-156"></a>Displays the entries in dynamic symbol table section of the file, if it
124has one.
125
126     <br><dt><samp><span class="env">-e</span></samp><dt><samp><span class="env">--headers</span></samp><dd>Display all the headers in the file.  Equivalent to <samp><span class="option">-h -l -S</span></samp>.
127
128     <br><dt><samp><span class="env">-n</span></samp><dt><samp><span class="env">--notes</span></samp><dd><a name="index-ELF-notes-157"></a>Displays the contents of the NOTE segments and/or sections, if any.
129
130     <br><dt><samp><span class="env">-r</span></samp><dt><samp><span class="env">--relocs</span></samp><dd><a name="index-ELF-reloc-information-158"></a>Displays the contents of the file's relocation section, if it has one.
131
132     <br><dt><samp><span class="env">-u</span></samp><dt><samp><span class="env">--unwind</span></samp><dd><a name="index-unwind-information-159"></a>Displays the contents of the file's unwind section, if it has one.  Only
133the unwind sections for IA64 ELF files, as well as ARM unwind tables
134(<code>.ARM.exidx</code> / <code>.ARM.extab</code>) are currently supported.
135
136     <br><dt><samp><span class="env">-d</span></samp><dt><samp><span class="env">--dynamic</span></samp><dd><a name="index-ELF-dynamic-section-information-160"></a>Displays the contents of the file's dynamic section, if it has one.
137
138     <br><dt><samp><span class="env">-V</span></samp><dt><samp><span class="env">--version-info</span></samp><dd><a name="index-ELF-version-sections-information-161"></a>Displays the contents of the version sections in the file, it they
139exist.
140
141     <br><dt><samp><span class="env">-A</span></samp><dt><samp><span class="env">--arch-specific</span></samp><dd>Displays architecture-specific information in the file, if there
142is any.
143
144     <br><dt><samp><span class="env">-D</span></samp><dt><samp><span class="env">--use-dynamic</span></samp><dd>When displaying symbols, this option makes <samp><span class="command">readelf</span></samp> use the
145symbol hash tables in the file's dynamic section, rather than the
146symbol table sections.
147
148     <br><dt><samp><span class="env">-x &lt;number or name&gt;</span></samp><dt><samp><span class="env">--hex-dump=&lt;number or name&gt;</span></samp><dd>Displays the contents of the indicated section as a hexadecimal bytes. 
149A number identifies a particular section by index in the section table;
150any other string identifies all sections with that name in the object file.
151
152     <br><dt><samp><span class="env">-R &lt;number or name&gt;</span></samp><dt><samp><span class="env">--relocated-dump=&lt;number or name&gt;</span></samp><dd>Displays the contents of the indicated section as a hexadecimal
153bytes.  A number identifies a particular section by index in the
154section table; any other string identifies all sections with that name
155in the object file.  The contents of the section will be relocated
156before they are displayed.
157
158     <br><dt><samp><span class="env">-p &lt;number or name&gt;</span></samp><dt><samp><span class="env">--string-dump=&lt;number or name&gt;</span></samp><dd>Displays the contents of the indicated section as printable strings. 
159A number identifies a particular section by index in the section table;
160any other string identifies all sections with that name in the object file.
161
162     <br><dt><samp><span class="env">-c</span></samp><dt><samp><span class="env">--archive-index</span></samp><dd><a name="index-Archive-file-symbol-index-information-162"></a>Displays the file symbol index information contained in the header part
163of binary archives.  Performs the same function as the <samp><span class="option">t</span></samp>
164command to <samp><span class="command">ar</span></samp>, but without using the BFD library.  See <a href="ar.html#ar">ar</a>.
165
166     <br><dt><samp><span class="env">-w[lLiaprmfFsoRt]</span></samp><dt><samp><span class="env">--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]</span></samp><dd>Displays the contents of the debug sections in the file, if any are
167present.  If one of the optional letters or words follows the switch
168then only data found in those specific sections will be dumped.
169
170     <p>Note that there is no single letter option to display the content of
171trace sections or .gdb_index.
172
173     <p>Note: the <samp><span class="option">=decodedline</span></samp> option will display the interpreted
174contents of a .debug_line section whereas the <samp><span class="option">=rawline</span></samp> option
175dumps the contents in a raw format.
176
177     <p>Note: the <samp><span class="option">=frames-interp</span></samp> option will display the interpreted
178contents of a .debug_frame section whereas the <samp><span class="option">=frames</span></samp> option
179dumps the contents in a raw format.
180
181     <p>Note: the output from the <samp><span class="option">=info</span></samp> option can also be affected
182by the options <samp><span class="option">--dwarf-depth</span></samp> and <samp><span class="option">--dwarf-start</span></samp>.
183
184     <br><dt><samp><span class="env">--dwarf-depth=</span><var>n</var></samp><dd>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children. 
185This is only useful with <samp><span class="option">--debug-dump=info</span></samp>.  The default is
186to print all DIEs; the special value 0 for <var>n</var> will also have this
187effect.
188
189     <p>With a non-zero value for <var>n</var>, DIEs at or deeper than <var>n</var>
190levels will not be printed.  The range for <var>n</var> is zero-based.
191
192     <br><dt><samp><span class="env">--dwarf-start=</span><var>n</var></samp><dd>Print only DIEs beginning with the DIE numbered <var>n</var>.  This is only
193useful with <samp><span class="option">--debug-dump=info</span></samp>.
194
195     <p>If specified, this option will suppress printing of any header
196information and all DIEs before the DIE numbered <var>n</var>.  Only
197siblings and children of the specified DIE will be printed.
198
199     <p>This can be used in conjunction with <samp><span class="option">--dwarf-depth</span></samp>.
200
201     <br><dt><samp><span class="env">-I</span></samp><dt><samp><span class="env">--histogram</span></samp><dd>Display a histogram of bucket list lengths when displaying the contents
202of the symbol tables.
203
204     <br><dt><samp><span class="env">-v</span></samp><dt><samp><span class="env">--version</span></samp><dd>Display the version number of readelf.
205
206     <br><dt><samp><span class="env">-W</span></samp><dt><samp><span class="env">--wide</span></samp><dd>Don't break output lines to fit into 80 columns. By default
207<samp><span class="command">readelf</span></samp> breaks section header and segment listing lines for
20864-bit ELF files, so that they fit into 80 columns. This option causes
209<samp><span class="command">readelf</span></samp> to print each section header resp. each segment one a
210single line, which is far more readable on terminals wider than 80 columns.
211
212     <br><dt><samp><span class="env">-H</span></samp><dt><samp><span class="env">--help</span></samp><dd>Display the command line options understood by <samp><span class="command">readelf</span></samp>.
213
214   </dl>
215
216<!-- man end -->
217   </body></html>
218
219