SIZE(1)
π SIZE(1) β the GNU Development Tools glow-up π
okay bestie, welcome to size(1), a lil utility from the GNU Development Tools crew, and she is so much more useful than her one-word name lets on. let's get into it π«Ά
β¨ NAME β¨
size β she lists the section sizes and the total size of binary files. that's it, that's the whole job, and she does it flawlessly. π
π SYNOPSIS π
size [-A|-B|-G|--format=compatibility]
[--help]
[-d|-o|-x|--radix=number]
[--common]
[-t|--totals]
[--target=bfdname] [-V|--version]
[-f]
[objfile...]
look at her. iconic. no cap. π
π¦ DESCRIPTION π¦
so the GNU size utility lists the section sizes plus the total size for every single one of the binary files objfile chillin' on its argument list. it's giving "let me read the receipts for you, bestie."
by default? one line of output per file β or per module, if that file happens to be an archive. she keeps it clean like that. β¨
objfile... are the files she's gonna examine. and if you pass her none at all? no worries, she defaults to the file a.out instead. she always has a fallback, she's prepared like that. π
π OPTIONS π
the command-line options have the following meanings (and yes we're doing all of them, no skipping, sit down):
-A,-B,-G,--format=compatibilityβ pick your vibe check for the output. use one of these and you decide whether GNUsizeoutput looks like System Vsize(that's-A, or--format=sysv) or Berkeleysize(that's-B, or--format=berkeley). the default is the one-line format, which is basically Berkeley's. OR, alternatively, you can go GNU format output with-Gor--format=gnuβ similar to Berkeley's output format, but the sizes get counted differently. and here's the receipts, bestie:
Berkeley (the default) format output from size:
$ size --format=Berkeley ranlib size
text data bss dec hex filename
294880 81920 11592 388392 5ed28 ranlib
294880 81920 11888 388688 5ee50 size
the Berkeley style counts read only data in the "text" column, not in the "data" column. and the "dec" and "hex" columns? both of them display the sum of the "text", "data", and "bss" columns β in decimal and hexadecimal respectively. slay. π
the GNU format counts read only data in the "data" column, not the "text" column, and only displays the sum of the "text", "data", and "bss" columns once, in the "total" column. the --radix option can be used to change the number base for all columns. here's that same data, GNU conventions edition:
$ size --format=GNU ranlib size
text data bss total filename
279880 96920 11592 388392 ranlib
279880 96920 11888 388688 size
and here's the same data again, but displayed closer to System V conventions:
$ 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
--help,-h,-H,-?β show a summary of acceptable arguments and options. when in doubt, ask the girl. π-d,-o,-x,--radix=numberβ this is your number-base situation. use one of these and you control whether the size of each section comes out in decimal (-d, or--radix=10), octal (-o, or--radix=8), or hexadecimal (-x, or--radix=16). and for--radix=number, only the three values (8,10,16) are supported β only those three, don't try to be cute. π the total size is always given in two radices: decimal and hexadecimal for-dor-xoutput, or octal and hexadecimal if you're using-o.--commonβ print total size of common symbols in each file. heads up though: when you're using Berkeley or GNU format, these are included in thebsssize. π₯-t,--totalsβ show totals of all objects listed. (Berkeley or GNU format mode only, so mind your format bestie.) π§--target=bfdnameβ tells her the object-code format for objfile is bfdname. tbh this option may not even be necessary;sizecan automatically recognize many formats. she's smart like that. β¨-v,-V,--versionβ display the version number ofsize. main character energy, she wants you to know which era of her you're getting.-fβ ignored. this option is used by other versions of thesizeprogram, but it is not supported by the GNU Binutils version. it's just there. standing in the corner. π@fileβ read command-line options from file. the options that get read are inserted in place of the original@fileoption. and if file doesn't exist, or can't be read? then the option will be treated literally, and not removed.
options inside file are separated by whitespace. and 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. plus β plot twist β the file may itself contain additional @file options; any such options will be processed recursively. it's files all the way down, bestie. π
πΈ SEE ALSO πΈ
go bother her friends too, they're all iconic: ar(1), objdump(1), readelf(1), and the Info entries for binutils. iykyk. π
π COPYRIGHT π
Copyright (c) 1991-2026 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". β¨
and that's the whole page, bestie!! you just read all of it and honestly? obsessed. π«Ά this little beauty is binutils-2.47, dated 2026-09-05, and she came to you straight from the SIZE(1) page. go list some section sizes, you absolute legend. πππ¦πΈπ
π¦ where this page comes from
- ubuntu stonking: binutils-arm-none-eabi 1:2.47-6ubuntu1+33
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms