SIZE(1)
π size(1) β GNU Development Tools β¨
okay so bestie, welcome to size β the man page, the myth, the legend. this is from the GNU Development Tools crew and it's about to be your new fave little utility. no cap. π«Ά
πΈ NAME πΈ
size β lists section sizes and total size. that's it, that's the whole vibe. she's simple, she's iconic, she ate. π
β¨ SYNOPSIS β¨
size [-A|-B|--format=compatibility]
[--help]
[-d|-o|-x|--radix=number]
[--common]
[-t|--totals]
[--target=bfdname] [-V|--version]
[objfile...]
π¦ DESCRIPTION π¦
so the GNU size utility lists the section sizes β and the total size β for each of the object or archive files objfile in its argument list. literally each one. π
by default, one line of output is generated for each object file or each module in an archive. one file, one line, clean and cute, we love a consistent queen. β¨
objfile... are the object files to be examined. and if you don't specify any at all? the file "a.out" will be used. (yes, queen, she's got a default. she's prepared. she doesn't need you to tell her what to do. main character energy fr fr. π
)
π OPTIONS π
the command line options have the following meanings β buckle up bestie, there's a bunch and they're all kinda great:
-A,-B,--format=compatibilityβ using one of these options, you can choose whether the output from GNUsizeresembles output from System Vsize(using-A, or--format=sysv), or Berkeleysize(using-B, or--format=berkeley). the default is the one-line format similar to Berkeley's. π§
here's an example of the Berkeley (default) format of 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
and this is the same data, 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
same numbers, two totally different outfits. it's giving versatility. π
--helpβ show a summary of acceptable arguments and options. your little cheat sheet, your pocket bestie. π«Ά-d,-o,-x,--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--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-dor-xoutput, or octal and hexadecimal if you're using-o. two radices at once?? she's doing the most and we're obsessed. π₯--commonβ print total size of common symbols in each file. when using Berkeley format these are included in the bss size. noted. π-t,--totalsβ show totals of all objects listed (Berkeley format listing mode only). important caveat bestie: Berkeley format listing mode only, so don't come for her if it doesn't show up elsewhere. π--target=bfdnameβ specify that the object-code format forobjfileisbfdname. this option may not be necessary;sizecan automatically recognize many formats. she's smart like that, she just knows. π§ β¨-V,--versionβ display the version number ofsize. cute little flex. π@fileβ read command-line options fromfile. the options read are inserted in place of the original@fileoption. iffiledoes not exist, or cannot be read, then the option will be treated literally, and not removed. π (yes, seriously, it just stays there being literal, iconic behaviour ngl)
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. it's giving inception, it's giving turtles all the way down, and honestly? we love that for her. π
π SEE ALSO π
ar(1), objdump(1), readelf(1), and the Info entries for binutils. go read those next, bestie, you know you want to. β
π COPYRIGHT π
Copyright (c) 1991-2018 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". π
okayyy that's the whole page, you made it to the end, so proud of you π₯Ήπ«Ά this absolute classic is binutils-2.30, dated 2018-01-27, and yes β it's a SIZE(1) moment. slay, periodt, go measure some sections. πβ¨πΈ
π¦ where this page comes from
- nixpkgs unstable: djgpp 12.2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms