strip(1) on Solnix vs Linux and the BSDs
On Solnix, strip is the illumos strip at /usr/bin/strip, which takes only -l, -V and -x and documents none of the GNU options such as -s, -g, -S, -o, -R or --strip-unneeded. For those, install pkgs.solnix.binutils and run gstrip.
The manual pages
- Solnix: strip(1) from
pkgs.solnix.illumos-world-man; the default on Solnix · illumos.org - Solnix: gstrip(1) (its page calls it strip) from
pkgs.solnix.binutils; add the package to get it - Linux: strip(1) binutils-2.46
- FreeBSD: strip(1) 15.1-RELEASE
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
strip
What Solnix runs
A default Solnix system runs the illumos strip at /usr/bin/strip. No other illumos variants are shipped. The GNU strip from pkgs.solnix.binutils is installed as gstrip and is not the command on PATH. To remove a named section on Solnix, the page points to mcs(1).
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | GNU strip is available as gstrip | The binutils package installs GNU strip as gstrip; its page has the same synopsis as the Linux strip(1) page and both describe GNU strip, the same program. Linux scripts that need GNU options should call gstrip on Solnix. Source: Solnix gstrip(1) from pkgs.solnix.binutils SYNOPSIS, DESCRIPTION; Linux strip(1) SYNOPSIS, DESCRIPTION |
| Linux | option set | Solnix strip accepts only -l, -V and -x. It documents no -s/--strip-all, -g/-S/-d/--strip-debug, --strip-unneeded, -K, -N, -R, -o, -p or --only-keep-debug, which Linux strip has.Source: illumos strip(1) SYNOPSIS, OPTIONS; Linux strip(1) SYNOPSIS, OPTIONS |
| Linux | -l option | Solnix strip -l strips line number information only and leaves the symbol table and debugging information. The Linux synopsis has no -l.Source: illumos strip(1) -l; Linux strip(1) SYNOPSIS |
| Linux | output file | Linux strip can write to a different file with -o file, and it says it modifies the named files in place otherwise. Solnix strip has no -o. The Solnix page does not say how it writes its result.Source: Linux strip(1) -o, DESCRIPTION; illumos strip(1) SYNOPSIS |
| Linux | default stripping | With no options, Solnix strip removes the symbol table and its string table, .line, .debug* and .stab* sections. GNU strip says it discards all symbols. Section-level control on Solnix is left to mcs(1). Source: illumos strip(1) DESCRIPTION, NOTES; Linux strip(1) DESCRIPTION |
| Linux | archives | On Solnix, stripping an archive also removes its archive symbol table, which must be restored with ar -s before ld can link it; strip warns when this happens. The Linux DESCRIPTION does not mention this.Source: illumos strip(1) DESCRIPTION (common archive file); Linux strip(1) DESCRIPTION |
| Linux | sections that are kept | Solnix strip keeps the symbol table if it lies in a segment or the file is relocatable, and keeps line and debug sections that lie in a segment or whose relocation section does. The Linux DESCRIPTION gives no such rule. Source: illumos strip(1) NOTES; Linux strip(1) DESCRIPTION |
| FreeBSD | FreeBSD page is llvm-objcopy | The FreeBSD strip(1) page documents llvm-objcopy (synopsis llvm-objcopy [options] input [output]) and points to llvm-strip(1). It lists no -l, -V or -x.Source: FreeBSD strip(1) NAME, SYNOPSIS, SEE ALSO; illumos strip(1) SYNOPSIS |
| FreeBSD | in-place and stdin/stdout | The FreeBSD page says a missing output file means the input is modified in place, and "-" means standard input or output. The Solnix page documents only file operands and has no output argument. Source: FreeBSD strip(1) DESCRIPTION; illumos strip(1) OPERANDS |
Everyday tasks
| Task | Solnix | Linux |
|---|---|---|
| strip symbols and debug info from a binary | strip file | strip -s objfile |
| strip only line number information | strip -l file | — |
Standards
- POSIX: strip is a POSIX.1-2024 utility.
- Solnix: ATTRIBUTES: Interface Stability is Standard. SEE ALSO references standards(7).
Writing portable scripts
- Do not expect the same result from plain strip file everywhere: Solnix removes the symbol table and debug sections, GNU strip discards all symbols, and the FreeBSD strip(1) page documents llvm-objcopy instead and points to llvm-strip(1).
- If a script needs GNU options such as
--strip-unneededor-o, install pkgs.solnix.binutils and call gstrip on Solnix.
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.