1SIZE(1)                      GNU Development Tools                     SIZE(1)
2
3
4

NAME

6       size - list section sizes and total size.
7

SYNOPSIS

9       size [-A-B--format=compatibility]
10            [--help]
11            [-d-o-x--radix=number]
12            [--common]
13            [-t--totals]
14            [--target=bfdname] [-V--version]
15            [objfile...]
16

DESCRIPTION

18       The GNU size utility lists the section sizes---and the total size---for
19       each of the object or archive files objfile in its argument  list.   By
20       default,  one  line of output is generated for each object file or each
21       module in an archive.
22
23       objfile... are the object files to be examined.  If none are specified,
24       the file "a.out" will be used.
25

OPTIONS

27       The command line options have the following meanings:
28
29       -A
30       -B
31       --format=compatibility
32           Using  one of these options, you can choose whether the output from
33           GNU size resembles output from System V size (using -A,  or  --for‐
34           mat=sysv),  or Berkeley size (using -B, or --format=berkeley).  The
35           default is the one-line format similar to Berkeley's.
36
37           Here is an example of the Berkeley (default) format of output  from
38           size:
39
40                   $ size --format=Berkeley ranlib size
41                   text    data    bss     dec     hex     filename
42                   294880  81920   11592   388392  5ed28   ranlib
43                   294880  81920   11888   388688  5ee50   size
44
45           This  is  the  same  data, but displayed closer to System V conven‐
46           tions:
47
48                   $ size --format=SysV ranlib size
49                   ranlib  :
50                   section         size         addr
51                   .text         294880         8192
52                   .data          81920       303104
53                   .bss           11592       385024
54                   Total         388392
55
56                   size  :
57                   section         size         addr
58                   .text         294880         8192
59                   .data          81920       303104
60                   .bss           11888       385024
61                   Total         388688
62
63       --help
64           Show a summary of acceptable arguments and options.
65
66       -d
67       -o
68       -x
69       --radix=number
70           Using one of these options, you can control  whether  the  size  of
71           each section is given in decimal (-d, or --radix=10); octal (-o, or
72           --radix=8); or hexadecimal (-x, or --radix=16).  In --radix=number,
73           only the three values (8, 10, 16) are supported.  The total size is
74           always given in two radices; decimal and hexadecimal for -d  or  -x
75           output, or octal and hexadecimal if you're using -o.
76
77       --common
78           Print total size of common symbols in each file.  When using Berke‐
79           ley format these are included in the bss size.
80
81       -t
82       --totals
83           Show totals of all objects listed  (Berkeley  format  listing  mode
84           only).
85
86       --target=bfdname
87           Specify  that  the object-code format for objfile is bfdname.  This
88           option may not be necessary; size can automatically recognize  many
89           formats.
90
91       -V
92       --version
93           Display the version number of size.
94
95       @file
96           Read command-line options from file.  The options read are inserted
97           in place of the original @file option.  If file does not exist,  or
98           cannot  be read, then the option will be treated literally, and not
99           removed.
100
101           Options in file are separated by whitespace.  A whitespace  charac‐
102           ter  may  be included in an option by surrounding the entire option
103           in either single or double  quotes.   Any  character  (including  a
104           backslash)  may  be  included  by  prefixing  the  character  to be
105           included with a backslash.  The file may itself contain  additional
106           @file options; any such options will be processed recursively.
107

SEE ALSO

109       ar(1), objdump(1), readelf(1), and the Info entries for binutils.
110
112       Copyright  (c)  1991,  1992,  1993, 1994, 1995, 1996, 1997, 1998, 1999,
113       2000, 2001, 2002, 2003, 2004, 2005,  2006,  2007,  2008  Free  Software
114       Foundation, Inc.
115
116       Permission  is  granted to copy, distribute and/or modify this document
117       under the terms of the GNU Free Documentation License, Version  1.2  or
118       any  later  version  published by the Free Software Foundation; with no
119       Invariant Sections, with no Front-Cover Texts, and with  no  Back-Cover
120       Texts.   A copy of the license is included in the section entitled "GNU
121       Free Documentation License".
122
123
124
125binutils-2.18.90                  2008-09-10                           SIZE(1)
Impressum