strip(1) on Solnix vs Linux and the BSDs
A default Solnix system runs the illumos strip at /usr/bin/strip, which takes only -l, -V and -x. The GNU binutils strip (pkgs.solnix.binutils) has the Linux option set, so GNU options such as -s, -S, -g, -o and --strip-unneeded fail on the default command.
The manual pages
- Solnix: strip(1) from
pkgs.solnix.binutils - 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
The published Solnix page is GNU strip from pkgs.solnix.binutils, but the command on PATH at /usr/bin/strip is the illumos one, with synopsis strip [-lVx] file... No other illumos variants are shipped. The GNU strip is a separate package; the bundle does not say what path it installs to. Install it with pkgs.solnix.binutils.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | which strip runs | The published Solnix page is GNU strip, the same program as Linux strip(1) with the same synopsis and options. The default /usr/bin/strip on Solnix is the illumos strip, which accepts only -l, -V and -x.Source: Solnix strip(1) SYNOPSIS (binutils); Linux strip(1) SYNOPSIS; Solnix SOLNIX DEFAULT ON PATH strip(1) SYNOPSIS |
| Linux, FreeBSD | -x meaning | illumos strip -x keeps the symbol table and may strip debugging and line number information. GNU strip -x (--discard-all) removes non-global symbols. A script using -x gets different results depending on the strip.Source: illumos strip(1) -x; Solnix (binutils) strip(1) -x, --discard-all; Linux strip(1) -x |
| Linux | -s, -S, -g, -d, --strip-unneeded missing | illumos strip has no -s, -S, -g, -d or --strip-unneeded. With no option it removes the symbol table, debugging and line number information. GNU strip uses -s/--strip-all for all symbols and -g/-S/-d/--strip-debug for debugging only.Source: illumos strip(1) SYNOPSIS, OPTIONS; Linux strip(1) -s, -g, -S, -d, --strip-unneeded |
| Linux | -l and -V meaning | illumos strip -l removes line number information only. illumos -V prints the version on standard error. GNU strip has no -l; its -V/--version is a version option, and the page does not say which stream it uses.Source: illumos strip(1) -l, -V; Linux strip(1) SYNOPSIS, -V |
| Linux | output file (-o) | illumos strip has no -o and rewrites each named file in place. GNU strip -o file writes the result elsewhere, but then only one objfile may be given.Source: illumos strip(1) SYNOPSIS; Linux strip(1) -o |
| Linux | section and symbol selection | illumos strip removes a fixed set of sections (.line, .debug*, .stab*) and has no section or symbol selection. Its page points to mcs(1) for removing a named section. GNU strip has -R, -K, -N and -w.Source: illumos strip(1) DESCRIPTION, NOTES; Linux strip(1) -R, -K, -N, -w |
| Linux | files that are not stripped | illumos does not remove the symbol table if it is inside a segment or the file is a relocatable object. Debug and line sections are kept if they are inside a segment. The GNU page in the bundle does not state this. Source: illumos strip(1) NOTES; Linux strip(1) DESCRIPTION |
| Linux | archives | illumos strip removes the archive symbol table from archives, and ar -s must restore it before ld(1) can link the archive. The GNU text in the bundle describes deterministic mode (-D, -U) for archives but does not mention this.Source: illumos strip(1) DESCRIPTION; Linux strip(1) -D, -U |
| FreeBSD | FreeBSD page is llvm-objcopy | The FreeBSD strip(1) page in the bundle is the llvm-objcopy page, with synopsis llvm-objcopy [options] input [output], and refers to llvm-strip(1). It does not list strip options in the trimmed text. Options cannot be compared with Solnix. Source: FreeBSD strip(1) NAME, SYNOPSIS, SEE ALSO |
| FreeBSD | known issue with target options | The FreeBSD page says --input-target and --target only affect binary and ihex formats. Other values are ignored and the input format is guessed. GNU strip -F, -I and -O take a bfdname.Source: FreeBSD strip(1) BUGS; Solnix (binutils) strip(1) -F, -I, -O |
| Linux, FreeBSD | environment and exit status | illumos strip lists LANG, LC_ALL, LC_CTYPE, LC_MESSAGES and NLSPATH, and exits 0 on success and >0 on error. The FreeBSD page also exits non-zero on error. The Linux text in the bundle shows no such sections. Source: illumos strip(1) ENVIRONMENT VARIABLES, EXIT STATUS; FreeBSD strip(1) EXIT STATUS |
Standards
- POSIX: strip is a POSIX.1-2024 utility.
- Solnix: illumos strip(1) Interface Stability: Standard.
Writing portable scripts
- Use only plain 'strip file' in portable scripts. Do not rely on
-s,-g,-o,-xor--strip-unneeded: they are missing or differ between illumos strip and GNU strip. - Check which strip is on PATH before using GNU options. The default Solnix
/usr/bin/stripis the illumos one, and GNU strip needs pkgs.solnix.binutils.
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.