-*- mode: troff; coding: utf-8 -*- Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) Standard preamble: ========================================================================..
..
..
\*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.. ds C` ""
. ds C' ""
'br\}
. ds C`
. ds C'
'br\}
Escape single quotes in literal strings from groff's Unicode transform. If the F register is >0, we'll generate index entries on stderr for titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index entries marked with X<> in POD. Of course, you'll have to process the output yourself in some meaningful fashion. Avoid warning from groff about undefined register 'F'...
.nr rF 0
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
Required to disable full justification in groff 1.23.0. ======================================================================== Title "SIZE 1" SIZE 1 2025-07-27 binutils-2.45 "GNU Development Tools"
For nroff, turn off justification. Always turn off hyphenation; it makes way too many mistakes in technical documents..nh
NAME
size - list section sizes and total size of binary files
SYNOPSIS
Header "SYNOPSIS" size [
-A|
-B|
-G|
--format=compatibility]
[
--help]
[
-d|
-o|
-x|
--radix=number]
[
--common]
[
-t|
--totals]
[
--target=bfdname] [
-V|
--version]
[
-f]
[
objfile...]
DESCRIPTION
Header "DESCRIPTION" The GNU
size utility lists the section sizes and the total
size for each of the binary files
objfile on its argument list.
By default, one line of output is generated for each file or each
module if the file is an archive.
\fIobjfile... are the files to be examined. If none are
specified, the file \*(C`a.out\*(C' will be used instead.
OPTIONS
Header "OPTIONS" The command-line options have the following meanings:
-A 4
Item "-A" 0
-B 4
Item "-B" -G 4
Item "-G" --format=compatibility 4
Item "--format=compatibility"
Using one of these options, you can choose whether the output from GNU
\fBsize resembles output from System V size (using -A,
or --format=sysv), or Berkeley size (using -B, or
\fB--format=berkeley). The default is the one-line format similar to
Berkeley\*(Aqs. Alternatively, you can choose the GNU format output
(using -G, or --format=gnu), this is similar to
Berkeley\*(Aqs output format, but sizes are counted differently.
.Sp
Here is an example of the Berkeley (default) format of output from
\fBsize:
.Sp
.Vb 4
$ size --format=Berkeley ranlib size
text data bss dec hex filename
294880 81920 11592 388392 5ed28 ranlib
294880 81920 11888 388688 5ee50 size
.Ve
.Sp
The Berkeley style output counts read only data in the \*(C`text\*(C'
column, not in the \*(C`data\*(C' column, the \*(C`dec\*(C' and \*(C`hex\*(C'
columns both display the sum of the \*(C`text\*(C', \*(C`data\*(C', and
\f(CW\*(C`bss\*(C' columns in decimal and hexadecimal respectively.
.Sp
The GNU format counts read only data in the \*(C`data\*(C' column, not
the \*(C`text\*(C' column, and only displays the sum of the \*(C`text\*(C',
\f(CW\*(C`data\*(C', and \*(C`bss\*(C' columns once, in the \*(C`total\*(C' column.
The --radix option can be used to change the number base for
all columns. Here is the same data displayed with GNU conventions:
.Sp
.Vb 4
$ size --format=GNU ranlib size
text data bss total filename
279880 96920 11592 388392 ranlib
279880 96920 11888 388688 size
.Ve
.Sp
This is the same data, but displayed closer to System V conventions:
.Sp
.Vb 7
$ 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
.Ve
--help 4
Item "--help" 0
-h 4
Item "-h" -H 4
Item "-H" -? 4
Item "-?"
Show a summary of acceptable arguments and options.
-d 4
Item "-d" 0
-o 4
Item "-o" -x 4
Item "-x" --radix=number 4
Item "--radix=number"
Using one of these options, you can control whether the size of each
section is given in decimal (-d, or --radix=10); octal
(-o, or --radix=8); or hexadecimal (-x, or
\fB--radix=16). In --radix=number, only the three
values (8, 10, 16) are supported. The total size is always given in two
radices; decimal and hexadecimal for -d or -x output, or
octal and hexadecimal if you\*(Aqre using -o.
--common 4
Item "--common" Print total size of common symbols in each file. When using Berkeley
or GNU format these are included in the bss size.
-t 4
Item "-t" 0
--totals 4
Item "--totals"
Show totals of all objects listed (Berkeley or GNU format mode only).
--target=bfdname 4
Item "--target=bfdname" Specify that the object-code format for
objfile is
\fIbfdname. This option may not be necessary;
size can
automatically recognize many formats.
-v 4
Item "-v" 0
-V 4
Item "-V" --version 4
Item "--version"
Display the version number of size.
-f 4
Item "-f" Ignored. This option is used by other versions of the
size
program, but it is not supported by the GNU Binutils version.
@file 4
Item "@file" Read command-line options from
file. The options read are
inserted in place of the original @
file option. If
file
does not exist, or cannot be read, then the option will be treated
literally, and not removed.
.Sp
Options in
file 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
file may itself contain additional
@
file options; any such options will be processed recursively.
"SEE ALSO"
Header "SEE ALSO" \fBar\|(1),
objdump\|(1),
readelf\|(1), and the Info entries for
binutils.
COPYRIGHT
Header "COPYRIGHT" Copyright (c) 1991-2025 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU 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 "GNU Free Documentation License".