size(1) on Solnix vs Linux and the BSDs
On a default Solnix system, size is the illumos /usr/bin/size, which takes only -f, -F, -n, -o, -V and -x. The published Solnix page describes GNU binutils size from pkgs.solnix.binutils, which is the same program as on Linux and has a different option set (--format, -A/-B/-G, -d, -t).
The manual pages
What Solnix runs
The page published as size(1) belongs to pkgs.solnix.binutils (GNU size). The command on PATH, /usr/bin/size, is the illumos one, with synopsis size [-f] [-F] [-n] [-o] [-V] [-x] filename... No other illumos variants are shipped. Options from the published page such as -A, -B, -G, --format, -d, -t and --radix are not in the illumos page. The bundle does not say where the GNU binary is installed.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | same program as the published Solnix page | The published Solnix page and the Linux page (binutils-2.46) are the same GNU size text, with identical synopsis and options. The difference is only which binary is first on PATH: on a default Solnix system it is the illumos one. Source: Solnix size(1) SYNOPSIS and OPTIONS; Linux size(1) SYNOPSIS and OPTIONS; header line on default PATH |
| Linux, FreeBSD | output format selection | The illumos size has no -A, -B, -G or --format. GNU size (Linux) selects sysv, berkeley or gnu output. FreeBSD llvm-size takes -A, -B, -m and --format with berkeley (default), sysv or darwin, but has no -G.Source: Solnix default size(1) SYNOPSIS; Linux size(1) -A, -B, -G, --format; FreeBSD size(1) --format, -A, -B, -m |
| Linux, FreeBSD | -f meaning | illumos size -f prints the size and name of each allocatable section plus their total. GNU size on Linux accepts -f but ignores it. The FreeBSD page does not document -f.Source: Solnix default size(1) -f; Linux size(1) -f; FreeBSD size(1) OPTIONS |
| Linux, FreeBSD | no -d or --radix | The illumos size has -o (octal) and -x (hex), but no -d and no --radix=number. Decimal is the default. Linux and FreeBSD accept -d and --radix with 8, 10 or 16.Source: Solnix default size(1) -o, -x; Linux size(1) -d, --radix; FreeBSD size(1) -d, --radix |
| Linux, FreeBSD, OpenBSD | no -t totals | The illumos size has no -t. Linux, FreeBSD and OpenBSD all have -t to print a total over all files listed. On illumos, you must add the numbers yourself.Source: Solnix default size(1) SYNOPSIS; Linux size(1) -t; FreeBSD size(1) --totals, -t; OpenBSD size(1) -t |
| Linux, FreeBSD, OpenBSD | illumos-only -F and -n, segment-based counting | illumos size reports ELF segments first and falls back to sections. -F lists loadable segments with permission flags, and -n lists non-loadable segments or non-allocatable sections. Linux, FreeBSD and OpenBSD have neither flag.Source: Solnix default size(1) DESCRIPTION, -F, -n; Linux size(1) OPTIONS; FreeBSD size(1) OPTIONS; OpenBSD size(1) SYNOPSIS |
| Linux, FreeBSD | version option | illumos size -V prints version information on standard error. GNU size accepts -v, -V and --version, and the FreeBSD page lists only --version. The GNU and FreeBSD pages do not say which stream is used.Source: Solnix default size(1) -V; Linux size(1) -v, -V, --version; FreeBSD size(1) --version |
| OpenBSD | OpenBSD options | OpenBSD size has only -t and -w. Output is always decimal, with the sum shown in decimal and hex, so there is no -o or -x. -w warns about non-object archive members, which the Solnix pages do not offer.Source: OpenBSD size(1) SYNOPSIS, DESCRIPTION, -w; Solnix default size(1) OPTIONS |
| FreeBSD | FreeBSD is llvm-size | FreeBSD size is llvm-size. It adds --arch and -l for Mach-O input, reads standard input when given "-", and by default ignores ELF common symbols unless --common is given. The Solnix pages show no stdin or Mach-O options.Source: FreeBSD size(1) DESCRIPTION, --arch, -l, --common; Solnix default size(1) SYNOPSIS |
| Linux, FreeBSD | no @file and no default a.out | The illumos synopsis requires filename... and its page documents no @file response files. GNU size and llvm-size read options from @file and default to a.out when no file is given. Source: Solnix default size(1) SYNOPSIS; Linux size(1) @file, objfile; FreeBSD size(1) DESCRIPTION, @<FILE> |
| Linux, FreeBSD, OpenBSD | pre-linked objects | The illumos page warns that bss size is not known until link-edit time, so totals for pre-linked objects are not the true total. The Linux, FreeBSD and OpenBSD pages carry no such note. Source: Solnix default size(1) NOTES |
Standards
- POSIX: size is not a POSIX.1-2024 utility.
- OpenBSD: HISTORY: a size command appeared in Version 3 AT&T UNIX.
Writing portable scripts
- Use only the default output and the file arguments across systems. Even
-oand-xare missing on OpenBSD, and-fmeans different things on illumos and GNU. - Do not rely on a fixed column layout or on
-t. Only GNU and LLVM size document--format, and the illumos size has no totals option.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.