• 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-2011.09/share/doc/arm-arm-none-eabi/html/binutils.html/
1<html lang="en">
2<head>
3<title>size - 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="readelf.html#readelf" title="readelf">
9<link rel="next" href="strings.html#strings" title="strings">
10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11<!--
12Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
132000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
14Free Software Foundation, Inc.
15
16Permission is granted to copy, distribute and/or modify this document
17under the terms of the GNU Free Documentation License, Version 1.3
18or any later version published by the Free Software Foundation;
19with no Invariant Sections, with no Front-Cover Texts, and with no
20Back-Cover Texts.  A copy of the license is included in the
21section entitled ``GNU Free Documentation License''.
22
23-->
24<meta http-equiv="Content-Style-Type" content="text/css">
25<style type="text/css"><!--
26  pre.display { font-family:inherit }
27  pre.format  { font-family:inherit }
28  pre.smalldisplay { font-family:inherit; font-size:smaller }
29  pre.smallformat  { font-family:inherit; font-size:smaller }
30  pre.smallexample { font-size:smaller }
31  pre.smalllisp    { font-size:smaller }
32  span.sc    { font-variant:small-caps }
33  span.roman { font-family:serif; font-weight:normal; } 
34  span.sansserif { font-family:sans-serif; font-weight:normal; } 
35--></style>
36<link rel="stylesheet" type="text/css" href="../cs.css">
37</head>
38<body>
39<div class="node">
40<a name="size"></a>
41<p>
42Next:&nbsp;<a rel="next" accesskey="n" href="strings.html#strings">strings</a>,
43Previous:&nbsp;<a rel="previous" accesskey="p" href="readelf.html#readelf">readelf</a>,
44Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
45<hr>
46</div>
47
48<h2 class="chapter">6 size</h2>
49
50<p><a name="index-size-106"></a><a name="index-section-sizes-107"></a>
51<!-- man title size list section sizes and total size. -->
52
53<pre class="smallexample">     <!-- man begin SYNOPSIS size -->
54     size [<samp><span class="option">-A</span></samp>|<samp><span class="option">-B</span></samp>|<samp><span class="option">--format=</span></samp><var>compatibility</var>]
55          [<samp><span class="option">--help</span></samp>]
56          [<samp><span class="option">-d</span></samp>|<samp><span class="option">-o</span></samp>|<samp><span class="option">-x</span></samp>|<samp><span class="option">--radix=</span></samp><var>number</var>]
57          [<samp><span class="option">--common</span></samp>]
58          [<samp><span class="option">-t</span></samp>|<samp><span class="option">--totals</span></samp>]
59          [<samp><span class="option">--target=</span></samp><var>bfdname</var>] [<samp><span class="option">-V</span></samp>|<samp><span class="option">--version</span></samp>]
60          [<var>objfile</var>...]
61     <!-- man end -->
62</pre>
63   <!-- man begin DESCRIPTION size -->
64   <p>The <span class="sc">gnu</span> <samp><span class="command">size</span></samp> utility lists the section sizes&mdash;and the total
65size&mdash;for each of the object or archive files <var>objfile</var> in its
66argument list.  By default, one line of output is generated for each
67object file or each module in an archive.
68
69   <p><var>objfile</var><small class="dots">...</small> are the object files to be examined. 
70If none are specified, the file <code>a.out</code> will be used.
71
72<!-- man end -->
73<!-- man begin OPTIONS size -->
74   <p>The command line options have the following meanings:
75
76     <dl>
77<dt><samp><span class="env">-A</span></samp><dt><samp><span class="env">-B</span></samp><dt><samp><span class="env">--format=</span><var>compatibility</var></samp><dd><a name="index-g_t_0040command_007bsize_007d-display-format-108"></a>Using one of these options, you can choose whether the output from <span class="sc">gnu</span>
78<samp><span class="command">size</span></samp> resembles output from System V <samp><span class="command">size</span></samp> (using <samp><span class="option">-A</span></samp>,
79or <samp><span class="option">--format=sysv</span></samp>), or Berkeley <samp><span class="command">size</span></samp> (using <samp><span class="option">-B</span></samp>, or
80<samp><span class="option">--format=berkeley</span></samp>).  The default is the one-line format similar to
81Berkeley's. 
82<!-- Bonus for doc-source readers: you can also say -format=strange (or -->
83<!-- anything else that starts with 's') for sysv, and -format=boring (or -->
84<!-- anything else that starts with 'b') for Berkeley. -->
85
86     <p>Here is an example of the Berkeley (default) format of output from
87<samp><span class="command">size</span></samp>:
88     <pre class="smallexample">          $ size --format=Berkeley ranlib size
89          text    data    bss     dec     hex     filename
90          294880  81920   11592   388392  5ed28   ranlib
91          294880  81920   11888   388688  5ee50   size
92</pre>
93     <p class="noindent">This is the same data, but displayed closer to System V conventions:
94
95     <pre class="smallexample">          $ size --format=SysV ranlib size
96          ranlib  :
97          section         size         addr
98          .text         294880         8192
99          .data          81920       303104
100          .bss           11592       385024
101          Total         388392
102          
103          
104          size  :
105          section         size         addr
106          .text         294880         8192
107          .data          81920       303104
108          .bss           11888       385024
109          Total         388688
110</pre>
111     <br><dt><samp><span class="env">--help</span></samp><dd>Show a summary of acceptable arguments and options.
112
113     <br><dt><samp><span class="env">-d</span></samp><dt><samp><span class="env">-o</span></samp><dt><samp><span class="env">-x</span></samp><dt><samp><span class="env">--radix=</span><var>number</var></samp><dd><a name="index-g_t_0040command_007bsize_007d-number-format-109"></a><a name="index-radix-for-section-sizes-110"></a>Using one of these options, you can control whether the size of each
114section is given in decimal (<samp><span class="option">-d</span></samp>, or <samp><span class="option">--radix=10</span></samp>); octal
115(<samp><span class="option">-o</span></samp>, or <samp><span class="option">--radix=8</span></samp>); or hexadecimal (<samp><span class="option">-x</span></samp>, or
116<samp><span class="option">--radix=16</span></samp>).  In <samp><span class="option">--radix=</span><var>number</var></samp>, only the three
117values (8, 10, 16) are supported.  The total size is always given in two
118radices; decimal and hexadecimal for <samp><span class="option">-d</span></samp> or <samp><span class="option">-x</span></samp> output, or
119octal and hexadecimal if you're using <samp><span class="option">-o</span></samp>.
120
121     <br><dt><samp><span class="env">--common</span></samp><dd>Print total size of common symbols in each file.  When using Berkeley
122format these are included in the bss size.
123
124     <br><dt><samp><span class="env">-t</span></samp><dt><samp><span class="env">--totals</span></samp><dd>Show totals of all objects listed (Berkeley format listing mode only).
125
126     <br><dt><samp><span class="env">--target=</span><var>bfdname</var></samp><dd><a name="index-object-code-format-111"></a>Specify that the object-code format for <var>objfile</var> is
127<var>bfdname</var>.  This option may not be necessary; <samp><span class="command">size</span></samp> can
128automatically recognize many formats. 
129See <a href="Target-Selection.html#Target-Selection">Target Selection</a>, for more information.
130
131     <br><dt><samp><span class="env">-V</span></samp><dt><samp><span class="env">--version</span></samp><dd>Display the version number of <samp><span class="command">size</span></samp>. 
132</dl>
133
134<!-- man end -->
135   </body></html>
136
137