274 lines
7.3 KiB
HTML
274 lines
7.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SIZE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SIZE</H1>
|
|
Section: GNU Development Tools (1)<BR>Updated: 2021-01-21<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
size - list section sizes and total size of binary files
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
size [<B>-A</B>|<B>-B</B>|<B>-G</B>|<B>--format=</B><I>compatibility</I>]
|
|
<BR> [<B>--help</B>]
|
|
<BR> [<B>-d</B>|<B>-o</B>|<B>-x</B>|<B>--radix=</B><I>number</I>]
|
|
<BR> [<B>--common</B>]
|
|
<BR> [<B>-t</B>|<B>--totals</B>]
|
|
<BR> [<B>--target=</B><I>bfdname</I>] [<B>-V</B>|<B>--version</B>]
|
|
<BR> [<I>objfile</I>...]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
The <FONT SIZE="-1">GNU</FONT> <B>size</B> utility lists the section sizes and the total
|
|
size for each of the binary files <I>objfile</I> on its argument list.
|
|
By default, one line of output is generated for each file or each
|
|
module if the file is an archive.
|
|
<P>
|
|
|
|
<I>objfile</I>... are the files to be examined. If none are
|
|
specified, the file <TT>"a.out"</TT> will be used instead.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
|
|
|
|
The command-line options have the following meanings:
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-A</B><DD>
|
|
|
|
|
|
|
|
<DT id="2"><B>-B</B><DD>
|
|
|
|
|
|
<DT id="3"><B>-G</B><DD>
|
|
|
|
|
|
<DT id="4"><B>--format=</B><I>compatibility</I><DD>
|
|
|
|
|
|
|
|
Using one of these options, you can choose whether the output from <FONT SIZE="-1">GNU</FONT>
|
|
<B>size</B> resembles output from System V <B>size</B> (using <B>-A</B>,
|
|
or <B>--format=sysv</B>), or Berkeley <B>size</B> (using <B>-B</B>, or
|
|
<B>--format=berkeley</B>). The default is the one-line format similar to
|
|
Berkeley's. Alternatively, you can choose the <FONT SIZE="-1">GNU</FONT> format output
|
|
(using <B>-G</B>, or <B>--format=gnu</B>), this is similar to
|
|
Berkeley's output format, but sizes are counted differently.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
Here is an example of the Berkeley (default) format of output from
|
|
<B>size</B>:
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
$ 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>
|
|
|
|
|
|
The Berkeley style output counts read only data in the <TT>"text"</TT>
|
|
column, not in the <TT>"data"</TT> column, the <TT>"dec"</TT> and <TT>"hex"</TT>
|
|
columns both display the sum of the <TT>"text"</TT>, <TT>"data"</TT>, and
|
|
<TT>"bss"</TT> columns in decimal and hexadecimal respectively.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
The <FONT SIZE="-1">GNU</FONT> format counts read only data in the <TT>"data"</TT> column, not
|
|
the <TT>"text"</TT> column, and only displays the sum of the <TT>"text"</TT>,
|
|
<TT>"data"</TT>, and <TT>"bss"</TT> columns once, in the <TT>"total"</TT> column.
|
|
The <B>--radix</B> option can be used to change the number base for
|
|
all columns. Here is the same data displayed with <FONT SIZE="-1">GNU</FONT> conventions:
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
$ size --format=GNU ranlib size
|
|
text data bss total filename
|
|
279880 96920 11592 388392 ranlib
|
|
279880 96920 11888 388688 size
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
This is the same data, but displayed closer to System V conventions:
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
$ 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>
|
|
|
|
|
|
<DT id="5"><B>--help</B><DD>
|
|
|
|
|
|
Show a summary of acceptable arguments and options.
|
|
<DT id="6"><B>-d</B><DD>
|
|
|
|
|
|
|
|
<DT id="7"><B>-o</B><DD>
|
|
|
|
|
|
<DT id="8"><B>-x</B><DD>
|
|
|
|
|
|
<DT id="9"><B>--radix=</B><I>number</I><DD>
|
|
|
|
|
|
|
|
Using one of these options, you can control whether the size of each
|
|
section is given in decimal (<B>-d</B>, or <B>--radix=10</B>); octal
|
|
(<B>-o</B>, or <B>--radix=8</B>); or hexadecimal (<B>-x</B>, or
|
|
<B>--radix=16</B>). In <B>--radix=</B><I>number</I>, only the three
|
|
values (8, 10, 16) are supported. The total size is always given in two
|
|
radices; decimal and hexadecimal for <B>-d</B> or <B>-x</B> output, or
|
|
octal and hexadecimal if you're using <B>-o</B>.
|
|
<DT id="10"><B>--common</B><DD>
|
|
|
|
|
|
Print total size of common symbols in each file. When using Berkeley
|
|
or <FONT SIZE="-1">GNU</FONT> format these are included in the bss size.
|
|
<DT id="11"><B>-t</B><DD>
|
|
|
|
|
|
|
|
<DT id="12"><B>--totals</B><DD>
|
|
|
|
|
|
|
|
Show totals of all objects listed (Berkeley or <FONT SIZE="-1">GNU</FONT> format mode only).
|
|
<DT id="13"><B>--target=</B><I>bfdname</I><DD>
|
|
|
|
|
|
Specify that the object-code format for <I>objfile</I> is
|
|
<I>bfdname</I>. This option may not be necessary; <B>size</B> can
|
|
automatically recognize many formats.
|
|
<DT id="14"><B>-V</B><DD>
|
|
|
|
|
|
|
|
<DT id="15"><B>--version</B><DD>
|
|
|
|
|
|
|
|
Display the version number of <B>size</B>.
|
|
<DT id="16"><B>@</B><I>file</I><DD>
|
|
|
|
|
|
Read command-line options from <I>file</I>. The options read are
|
|
inserted in place of the original @<I>file</I> option. If <I>file</I>
|
|
does not exist, or cannot be read, then the option will be treated
|
|
literally, and not removed.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
Options in <I>file</I> are separated by whitespace. A whitespace
|
|
character may be included in an option by surrounding the entire
|
|
option in either single or double quotes. Any character (including a
|
|
backslash) may be included by prefixing the character to be included
|
|
with a backslash. The <I>file</I> may itself contain additional
|
|
@<I>file</I> options; any such options will be processed recursively.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ar">ar</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+objdump">objdump</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+readelf">readelf</A></B>(1), and the Info entries for <I>binutils</I>.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copyright (c) 1991-2020 Free Software Foundation, Inc.
|
|
<P>
|
|
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
under the terms of the <FONT SIZE="-1">GNU</FONT> Free Documentation License, Version 1.3
|
|
or any later version published by the Free Software Foundation;
|
|
with no Invariant Sections, with no Front-Cover Texts, and with no
|
|
Back-Cover Texts. A copy of the license is included in the
|
|
section entitled ``<FONT SIZE="-1">GNU</FONT> Free Documentation License''.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="17"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="18"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="19"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="20"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="21"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
<DT id="22"><A HREF="#lbAG">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:27 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|