Debian Codegraph @

upstream/fedora-44/man1/size.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.47)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "SIZE 1"
61 .TH SIZE 1 2026-02-09 binutils-2.46 "GNU Development Tools"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 size \- list section sizes and total size of binary files
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 size [\fB\-A\fR|\fB\-B\fR|\fB\-G\fR|\fB\-\-format=\fR\fIcompatibility\fR]
71 [\fB\-\-help\fR]
72 [\fB\-d\fR|\fB\-o\fR|\fB\-x\fR|\fB\-\-radix=\fR\fInumber\fR]
73 [\fB\-\-common\fR]
74 [\fB\-t\fR|\fB\-\-totals\fR]
75 [\fB\-\-target=\fR\fIbfdname\fR] [\fB\-V\fR|\fB\-\-version\fR]
76 [\fB\-f\fR]
77 [\fIobjfile\fR...]
78 .SH DESCRIPTION
79 .IX Header "DESCRIPTION"
80 The GNU \fBsize\fR utility lists the section sizes and the total
81 size for each of the binary files \fIobjfile\fR on its argument list.
82 By default, one line of output is generated for each file or each
83 module if the file is an archive.
84 .PP
85 \&\fIobjfile\fR... are the files to be examined. If none are
86 specified, the file \f(CW\*(C`a.out\*(C'\fR will be used instead.
87 .SH OPTIONS
88 .IX Header "OPTIONS"
89 The command\-line options have the following meanings:
90 .IP \fB\-A\fR 4
91 .IX Item "-A"
92 .PD 0
93 .IP \fB\-B\fR 4
94 .IX Item "-B"
95 .IP \fB\-G\fR 4
96 .IX Item "-G"
97 .IP \fB\-\-format=\fR\fIcompatibility\fR 4
98 .IX Item "--format=compatibility"
99 .PD
100 Using one of these options, you can choose whether the output from GNU
101 \&\fBsize\fR resembles output from System V \fBsize\fR (using \fB\-A\fR,
102 or \fB\-\-format=sysv\fR), or Berkeley \fBsize\fR (using \fB\-B\fR, or
103 \&\fB\-\-format=berkeley\fR). The default is the one\-line format similar to
104 Berkeley\*(Aqs. Alternatively, you can choose the GNU format output
105 (using \fB\-G\fR, or \fB\-\-format=gnu\fR), this is similar to
106 Berkeley\*(Aqs output format, but sizes are counted differently.
107 .Sp
108 Here is an example of the Berkeley (default) format of output from
109 \&\fBsize\fR:
110 .Sp
111 .Vb 4
112 \& $ size \-\-format=Berkeley ranlib size
113 \& text data bss dec hex filename
114 \& 294880 81920 11592 388392 5ed28 ranlib
115 \& 294880 81920 11888 388688 5ee50 size
116 .Ve
117 .Sp
118 The Berkeley style output counts read only data in the \f(CW\*(C`text\*(C'\fR
119 column, not in the \f(CW\*(C`data\*(C'\fR column, the \f(CW\*(C`dec\*(C'\fR and \f(CW\*(C`hex\*(C'\fR
120 columns both display the sum of the \f(CW\*(C`text\*(C'\fR, \f(CW\*(C`data\*(C'\fR, and
121 \&\f(CW\*(C`bss\*(C'\fR columns in decimal and hexadecimal respectively.
122 .Sp
123 The GNU format counts read only data in the \f(CW\*(C`data\*(C'\fR column, not
124 the \f(CW\*(C`text\*(C'\fR column, and only displays the sum of the \f(CW\*(C`text\*(C'\fR,
125 \&\f(CW\*(C`data\*(C'\fR, and \f(CW\*(C`bss\*(C'\fR columns once, in the \f(CW\*(C`total\*(C'\fR column.
126 The \fB\-\-radix\fR option can be used to change the number base for
127 all columns. Here is the same data displayed with GNU conventions:
128 .Sp
129 .Vb 4
130 \& $ size \-\-format=GNU ranlib size
131 \& text data bss total filename
132 \& 279880 96920 11592 388392 ranlib
133 \& 279880 96920 11888 388688 size
134 .Ve
135 .Sp
136 This is the same data, but displayed closer to System V conventions:
137 .Sp
138 .Vb 7
139 \& $ size \-\-format=SysV ranlib size
140 \& ranlib :
141 \& section size addr
142 \& .text 294880 8192
143 \& .data 81920 303104
144 \& .bss 11592 385024
145 \& Total 388392
146 \&
147 \&
148 \& size :
149 \& section size addr
150 \& .text 294880 8192
151 \& .data 81920 303104
152 \& .bss 11888 385024
153 \& Total 388688
154 .Ve
155 .IP \fB\-\-help\fR 4
156 .IX Item "--help"
157 .PD 0
158 .IP \fB\-h\fR 4
159 .IX Item "-h"
160 .IP \fB\-H\fR 4
161 .IX Item "-H"
162 .IP \fB\-?\fR 4
163 .IX Item "-?"
164 .PD
165 Show a summary of acceptable arguments and options.
166 .IP \fB\-d\fR 4
167 .IX Item "-d"
168 .PD 0
169 .IP \fB\-o\fR 4
170 .IX Item "-o"
171 .IP \fB\-x\fR 4
172 .IX Item "-x"
173 .IP \fB\-\-radix=\fR\fInumber\fR 4
174 .IX Item "--radix=number"
175 .PD
176 Using one of these options, you can control whether the size of each
177 section is given in decimal (\fB\-d\fR, or \fB\-\-radix=10\fR); octal
178 (\fB\-o\fR, or \fB\-\-radix=8\fR); or hexadecimal (\fB\-x\fR, or
179 \&\fB\-\-radix=16\fR). In \fB\-\-radix=\fR\fInumber\fR, only the three
180 values (8, 10, 16) are supported. The total size is always given in two
181 radices; decimal and hexadecimal for \fB\-d\fR or \fB\-x\fR output, or
182 octal and hexadecimal if you\*(Aqre using \fB\-o\fR.
183 .IP \fB\-\-common\fR 4
184 .IX Item "--common"
185 Print total size of common symbols in each file. When using Berkeley
186 or GNU format these are included in the bss size.
187 .IP \fB\-t\fR 4
188 .IX Item "-t"
189 .PD 0
190 .IP \fB\-\-totals\fR 4
191 .IX Item "--totals"
192 .PD
193 Show totals of all objects listed (Berkeley or GNU format mode only).
194 .IP \fB\-\-target=\fR\fIbfdname\fR 4
195 .IX Item "--target=bfdname"
196 Specify that the object\-code format for \fIobjfile\fR is
197 \&\fIbfdname\fR. This option may not be necessary; \fBsize\fR can
198 automatically recognize many formats.
199 .IP \fB\-v\fR 4
200 .IX Item "-v"
201 .PD 0
202 .IP \fB\-V\fR 4
203 .IX Item "-V"
204 .IP \fB\-\-version\fR 4
205 .IX Item "--version"
206 .PD
207 Display the version number of \fBsize\fR.
208 .IP \fB\-f\fR 4
209 .IX Item "-f"
210 Ignored. This option is used by other versions of the \fBsize\fR
211 program, but it is not supported by the GNU Binutils version.
212 .IP \fB@\fR\fIfile\fR 4
213 .IX Item "@file"
214 Read command\-line options from \fIfile\fR. The options read are
215 inserted in place of the original @\fIfile\fR option. If \fIfile\fR
216 does not exist, or cannot be read, then the option will be treated
217 literally, and not removed.
218 .Sp
219 Options in \fIfile\fR are separated by whitespace. A whitespace
220 character may be included in an option by surrounding the entire
221 option in either single or double quotes. Any character (including a
222 backslash) may be included by prefixing the character to be included
223 with a backslash. The \fIfile\fR may itself contain additional
224 @\fIfile\fR options; any such options will be processed recursively.
225 .SH "SEE ALSO"
226 .IX Header "SEE ALSO"
227 \&\fBar\fR\|(1), \fBobjdump\fR\|(1), \fBreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
228 .SH COPYRIGHT
229 .IX Header "COPYRIGHT"
230 Copyright (c) 1991\-2026 Free Software Foundation, Inc.
231 .PP
232 Permission is granted to copy, distribute and/or modify this document
233 under the terms of the GNU Free Documentation License, Version 1.3
234 or any later version published by the Free Software Foundation;
235 with no Invariant Sections, with no Front\-Cover Texts, and with no
236 Back\-Cover Texts. A copy of the license is included in the
237 section entitled "GNU Free Documentation License".