lorder(1) on Solnix vs Linux and the BSDs

On Solnix, lorder is the illumos lorder at /usr/bin/lorder. It prints pairs of object or archive member names for tsort(1), like FreeBSD lorder. The pages differ in the environment variables they document, the single-input-file rule and the file-name caveats. Only FreeBSD is a counterpart in the bundle.

What Solnix runs

A default Solnix system runs the illumos lorder at /usr/bin/lorder. No other variants are shipped.

Differences

Compared withTopicWhat differs
FreeBSDenvironment variablesFreeBSD lorder reads NM (path to nm(1), default nm) and NMFLAGS (flags passed to nm). The Solnix page documents neither. Its NOTES mention only a TMPDIR file-name length limit, set by what sed allows.
Source: FreeBSD lorder(1) ENVIRONMENT (NM, NMFLAGS); Solnix lorder(1) NOTES (TMPDIR)
FreeBSDhow dependencies are foundFreeBSD lorder uses nm(1) to determine interdependencies. The Solnix page does not say how it finds them. It says only that the first file of each pair refers to external identifiers defined in the second.
Source: FreeBSD lorder(1) DESCRIPTION; Solnix lorder(1) DESCRIPTION
FreeBSDsingle input file must end in .oSolnix lorder accepts any object or archive file regardless of suffix when there is more than one input file. With a single input file, the suffix must be .o. The FreeBSD page states no such rule.
Source: Solnix lorder(1) NOTES; FreeBSD lorder(1) DESCRIPTION
FreeBSDfile names with spacesFreeBSD documents that lorder does not work properly with file names containing spaces or newlines. The Solnix page does not mention this. Its example passes lorder output through backquotes, which has the same word-splitting issue.
Source: FreeBSD lorder(1) CAVEATS; Solnix lorder(1) DESCRIPTION example
FreeBSDstated need for lorderBoth pages say modern linkers do not need lorder. Solnix says ld can make multiple passes over a portable-format archive, and lorder may only make access more efficient. FreeBSD says lorder is provided for legacy code bases and build systems.
Source: Solnix lorder(1) DESCRIPTION; FreeBSD lorder(1) DESCRIPTION
FreeBSDstatic binary linking useFreeBSD documents using lorder with tsort(1) to sort libraries in dependency order when linking static binaries. The Solnix page documents only building a library from .o files with ar -cr library `lorder *.o | tsort`.
Source: FreeBSD lorder(1) DESCRIPTION; Solnix lorder(1) DESCRIPTION example
Linux, OpenBSD, NetBSDno counterpart pageThe bundle has no Linux, OpenBSD or NetBSD lorder page. The manual cannot confirm whether those systems ship lorder or how it behaves there.
Source: Bundle header (only COUNTERPART freebsd listed)

Standards

  • POSIX: lorder is not a POSIX.1-2024 utility.
  • FreeBSD: HISTORY: a lorder utility appeared in Version 7 AT&T UNIX.

Writing portable scripts

  • Pass lorder only file names without spaces or newlines, and give it more than one input file or a single file ending in .o.
  • Do not set NM or NMFLAGS expecting Solnix lorder to honour them; the Solnix page does not document them.

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.