📄 size.html
字号:
<html lang="en">
<head>
<title>GNU Binary Utilities</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Binary Utilities">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
</head>
<body>
<div class="node">
<p>
Node:<a name="size">size</a>,
Next:<a rel="next" accesskey="n" href="strings.html#strings">strings</a>,
Previous:<a rel="previous" accesskey="p" href="readelf.html#readelf">readelf</a>,
Up:<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr><br>
</div>
<h2 class="chapter">size</h2>
<pre class="smallexample"> size [<code>-A</code>|<code>-B</code>|<code>--format=</code><var>compatibility</var>]
[<code>--help</code>]
[<code>-d</code>|<code>-o</code>|<code>-x</code>|<code>--radix=</code><var>number</var>]
[<code>-t</code>|<code>--totals</code>]
[<code>--target=</code><var>bfdname</var>] [<code>-V</code>|<code>--version</code>]
[<var>objfile</var>...]
</pre>
<p>The <small>GNU</small> <code>size</code> utility lists the section sizes--and the total
size--for each of the object or archive files <var>objfile</var> in its
argument list. By default, one line of output is generated for each
object file or each module in an archive.
<p><var>objfile</var><small class="dots">...</small> are the object files to be examined.
If none are specified, the file <code>a.out</code> will be used.
<p>The command line options have the following meanings:
<dl>
<dt><code>-A</code>
<dd><dt><code>-B</code>
<dd><dt><code>--format=</code><var>compatibility</var><code></code>
<dd>Using one of these options, you can choose whether the output from <small>GNU</small>
<code>size</code> resembles output from System V <code>size</code> (using <code>-A</code>,
or <code>--format=sysv</code>), or Berkeley <code>size</code> (using <code>-B</code>, or
<code>--format=berkeley</code>). The default is the one-line format similar to
Berkeley's.
<p>Here is an example of the Berkeley (default) format of output from
<code>size</code>:
<pre class="smallexample"> $ size --format=Berkeley ranlib size
text data bss dec hex filename
294880 81920 11592 388392 5ed28 ranlib
294880 81920 11888 388688 5ee50 size
</pre>
<p>This is the same data, but displayed closer to System V conventions:
<pre class="smallexample"> $ size --format=SysV ranlib size
ranlib :
section size addr
.text 294880 8192
.data 81920 303104
.bss 11592 385024
Total 388392
size :
section size addr
.text 294880 8192
.data 81920 303104
.bss 11888 385024
Total 388688
</pre>
<br><dt><code>--help</code>
<dd>Show a summary of acceptable arguments and options.
<br><dt><code>-d</code>
<dd><dt><code>-o</code>
<dd><dt><code>-x</code>
<dd><dt><code>--radix=</code><var>number</var><code></code>
<dd>Using one of these options, you can control whether the size of each
section is given in decimal (<code>-d</code>, or <code>--radix=10</code>); octal
(<code>-o</code>, or <code>--radix=8</code>); or hexadecimal (<code>-x</code>, or
<code>--radix=16</code>). In <code>--radix=</code><var>number</var><code></code>, only the three
values (8, 10, 16) are supported. The total size is always given in two
radices; decimal and hexadecimal for <code>-d</code> or <code>-x</code> output, or
octal and hexadecimal if you're using <code>-o</code>.
<br><dt><code>-t</code>
<dd><dt><code>--totals</code>
<dd>Show totals of all objects listed (Berkeley format listing mode only).
<br><dt><code>--target=</code><var>bfdname</var><code></code>
<dd>Specify that the object-code format for <var>objfile</var> is
<var>bfdname</var>. This option may not be necessary; <code>size</code> can
automatically recognize many formats.
See <a href="Target-Selection.html#Target%20Selection">Target Selection</a>, for more information.
<br><dt><code>-V</code>
<dd><dt><code>--version</code>
<dd>Display the version number of <code>size</code>.
</dl>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -