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 GNU size output looks like System V size (that's -A, or --format=sysv) or Berkeley size (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 -G or --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 -d or -x output, 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 the bss size. πŸ”₯
  • -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; size can automatically recognize many formats. she's smart like that. ✨
  • -v, -V, --version β€” display the version number of size. 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 the size program, 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 @file option. 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 (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