Sign in

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.

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 withTopicWhat differs
LinuxGNU strip is available as gstripThe 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
Linuxoption setSolnix 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 optionSolnix 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
Linuxoutput fileLinux 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
Linuxdefault strippingWith 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
LinuxarchivesOn 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
Linuxsections that are keptSolnix 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
FreeBSDFreeBSD page is llvm-objcopyThe 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
FreeBSDin-place and stdin/stdoutThe 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

TaskSolnixLinux
strip symbols and debug info from a binarystrip filestrip -s objfile
strip only line number informationstrip -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-unneeded or -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.