nm(1) on Solnix vs Linux and the BSDs

On a default Solnix system, nm is the illumos nm at /usr/bin/nm, not the GNU nm that the published page describes. Several single-letter flags differ from Linux and the BSDs. For example, -o means octal, -n sorts by name, and -r prepends the file name.

What Solnix runs

The published Solnix page comes from pkgs.solnix.binutils and describes GNU nm, with the same synopsis as the Linux page. The command on PATH is the illumos /usr/bin/nm. /usr/xpg4/bin/nm is also shipped. The two differ in the illumos page for -u, which prints undefined symbols only in /usr/bin/nm but gives a long listing per undefined symbol in xpg4. -v and -V and -x are listed in the page under the xpg4 heading only. The illumos nm has no long options. To get GNU nm, add pkgs.solnix.binutils; the bundle does not give its install path.

Differences

Compared withTopicWhat differs
all four-o meaningIllumos nm -o prints values and sizes in octal (same as -t o). On Linux, FreeBSD and OpenBSD, -o is the same as -A and prefixes each line with the file name. A script that uses -o for file names gets octal output on Solnix.
Source: Solnix illumos nm(1) -o; Linux nm(1) -A, -o; FreeBSD nm(1) --print-file-name, -A, -o; OpenBSD nm(1) -o
Linux, FreeBSD, OpenBSD-r meaningIllumos nm -r prepends the object file or archive name to each line. On Linux, FreeBSD and OpenBSD, -r reverses the sort order. Use -A for file names on illumos.
Source: Solnix illumos nm(1) -r, -A; Linux nm(1) -r, --reverse-sort; FreeBSD nm(1) --reverse-sort; OpenBSD nm(1) -r
Linux, FreeBSD, OpenBSD-n sortingIllumos nm -n sorts external symbols by name. On Linux, FreeBSD and OpenBSD, -n sorts by address (numeric order). The illumos page lists -v, which sorts external symbols by value, only under /usr/xpg4/bin/nm.
Source: Solnix illumos nm(1) -n, -v; Linux nm(1) -n, --numeric-sort; FreeBSD nm(1) --numeric-sort; OpenBSD nm(1) -n
Linux, FreeBSD, OpenBSD-p meaningIllumos nm -p produces terse, easy-to-parse output with a key letter per symbol. On Linux, FreeBSD and OpenBSD, -p means do not sort. The illumos option for unsorted output is -i.
Source: Solnix illumos nm(1) -p, -i; Linux nm(1) -p, --no-sort; FreeBSD nm(1) --no-sort, -p; OpenBSD nm(1) -p
Linux, FreeBSD, OpenBSD-s meaningIllumos nm -s prints the section name instead of the section index. On Linux, -s is --print-armap and on OpenBSD it shows the archive index. FreeBSD documents only the long form --print-armap.
Source: Solnix illumos nm(1) -s; Linux nm(1) -s, --print-armap; OpenBSD nm(1) -s; FreeBSD nm(1) --print-armap
Linux, FreeBSD-h, -l, -fIllumos -h suppresses the heading, while on Linux and FreeBSD -h prints help. Illumos -l marks weak symbols with *, while Linux -l prints line numbers. Illumos -f is deprecated, while Linux and FreeBSD -f selects the output format.
Source: Solnix illumos nm(1) -h, -l, -f, NOTES; Linux nm(1) -h, -l, -f; FreeBSD nm(1) --help, --format
Linux, FreeBSD, OpenBSDdefault radixIllumos nm writes numeric values in decimal by default, and -t takes d, o or x. GNU nm shows values in hexadecimal by default. FreeBSD's default BSD format uses 8-digit hexadecimal addresses. OpenBSD says POSIX-format values default to decimal.
Source: Solnix illumos nm(1) -t; Linux nm(1) DESCRIPTION (symbol value); FreeBSD nm(1) DESCRIPTION; OpenBSD nm(1) -P
Linux, FreeBSD, OpenBSDlong options and missing optionsIllumos nm documents no long options such as --dynamic or --format, and no -S, -a, -B, -j, -U or -W. Linux and FreeBSD have these, though FreeBSD lacks -l. Illumos adds -L, -R, -T, -x and -e. OpenBSD -e means extended information.
Source: Solnix illumos nm(1) SYNOPSIS and OPTIONS; Linux nm(1) SYNOPSIS; FreeBSD nm(1) OPTIONS; OpenBSD nm(1) -e
Linux, FreeBSD, OpenBSD-V and -uIllumos documents -V as printing the version on standard error, listed under /usr/xpg4/bin/nm. Linux and FreeBSD also have --version. In /usr/xpg4/bin/nm, -u gives a long listing per undefined symbol, whereas Linux, FreeBSD and OpenBSD -u lists undefined symbols only.
Source: Solnix illumos nm(1) -V, -u; Linux nm(1) -V, -u; FreeBSD nm(1) --version, --undefined-only; OpenBSD nm(1) -u
Linux, FreeBSD, OpenBSDsymbol type letters and weak symbolsWith -p, illumos uses upper-case key letters for weak symbols and adds F, N, L and S. GNU nm uses V/v and W/w for weak symbols. FreeBSD llvm-nm uses V/v and W/w, with w and v meaning undefined. OpenBSD uses W.
Source: Solnix illumos nm(1) -p; Linux nm(1) DESCRIPTION (V, W); FreeBSD nm(1) DESCRIPTION; OpenBSD nm(1) letter list
FreeBSDFreeBSD is llvm-nmThe FreeBSD nm(1) page is for llvm-nm, whose BUGS section says it does not support the full set of arguments GNU nm does. Its EXIT STATUS says it exits with zero.
Source: FreeBSD nm(1) NAME, BUGS, EXIT STATUS
Linux, FreeBSD, OpenBSDdefault input fileGNU nm, llvm-nm and OpenBSD nm read a.out when no file is given. The illumos SYNOPSIS requires file, and the page does not document an a.out default. Illumos reports a file with no symbols without treating it as an error.
Source: Solnix illumos nm(1) SYNOPSIS, DESCRIPTION; Linux nm(1) DESCRIPTION; FreeBSD nm(1) DESCRIPTION; OpenBSD nm(1) DESCRIPTION

Standards

  • POSIX: nm is a POSIX.1-2024 utility.
  • OpenBSD: The nm utility is part of the IEEE Std 1003.1-2008 (“POSIX.1”) specification; this implementation is largely incompatible with that standard.
  • Solnix: Illumos /usr/xpg4/bin/nm has Interface Stability: Committed. The illumos page lists standards(7) under SEE ALSO.

Writing portable scripts

  • Avoid -o, -n, -p, -r, -s, -v, -l and -h in portable scripts, because their meanings differ between illumos nm and GNU, LLVM and OpenBSD nm.
  • Use -P with -t d, -t o or -t x for output that is easier to parse; all four implementations document -P and -t.

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.