objcopy(1) on Solnix vs Linux and the BSDs

objcopy is not in the Solnix base system: install pkgs.solnix.binutils to get GNU objcopy. The Solnix page is the same GNU binutils text as Linux. FreeBSD's objcopy page documents llvm-objcopy, which has a different synopsis, and OpenBSD ships an older GNU objcopy with fewer options.

What Solnix runs

Not installed by default: add pkgs.solnix.binutils. The bundle shows no other illumos variant of objcopy.

Differences

Compared withTopicWhat differs
Linuxsame programThe Solnix page and the Linux page describe the same GNU binutils objcopy. The synopsis, the option list and the DESCRIPTION text match, including the BFD library, -O srec and -O binary.
Source: Solnix objcopy(1) SYNOPSIS, DESCRIPTION; Linux objcopy(1) SYNOPSIS, DESCRIPTION
FreeBSDdifferent implementationFreeBSD's objcopy page is llvm-objcopy, not GNU objcopy. Its synopsis is only llvm-objcopy [options] input [output]. The page says it works as a drop-in replacement for GNU objcopy in most scenarios, not all.
Source: FreeBSD objcopy(1) NAME, SYNOPSIS, DESCRIPTION; Solnix objcopy(1) DESCRIPTION
FreeBSD-I, -F and --target honoured only for binary and ihexOn FreeBSD, --input-target and --target affect only the binary and ihex formats. Other values are ignored and the input format is guessed. On Solnix, -I bfdname makes objcopy treat the input as that format.
Source: FreeBSD objcopy(1) BUGS; Solnix objcopy(1) -I, --input-target
FreeBSDstdin, stdout and archivesFreeBSD objcopy reads the input from stdin when the input is "-" and writes to stdout when the output is "-". It applies operations to each archive member. The Solnix page does not document "-" as a file name.
Source: FreeBSD objcopy(1) DESCRIPTION; Solnix objcopy(1) OPTIONS (infile, outfile)
FreeBSDdocumented optionsThe FreeBSD page in the bundle lists no individual options, so a script using Solnix flags such as --add-section or --strip-unneeded cannot be checked against it. Check llvm-objcopy directly.
Source: FreeBSD objcopy(1) SYNOPSIS (options only); Solnix objcopy(1) SYNOPSIS
OpenBSDmissing optionsOpenBSD objcopy has no --strip-unneeded in its synopsis. It also lacks --dump-section, --update-section, --remove-relocations, --strip-section-headers, --reverse-bytes, -D/-U, --compress-debug-sections, --strip-dwo and --extract-dwo, all of which are in the Solnix synopsis.
Source: OpenBSD objcopy(1) SYNOPSIS; Solnix objcopy(1) SYNOPSIS
OpenBSD-j and -R take names, not patternsOn OpenBSD, -j and -R take a section name. On Solnix they take a sectionpattern, wildcards are accepted, and a leading ! excludes matches. Solnix also says using -j and -R together gives undefined behaviour.
Source: OpenBSD objcopy(1) -j, -R; Solnix objcopy(1) -j, -R
OpenBSD-i interleave argumentOpenBSD -i takes a required interleave argument. The Solnix synopsis shows [-i [breadth]] with an optional argument, plus --interleave-width.
Source: OpenBSD objcopy(1) SYNOPSIS (-i interleave); Solnix objcopy(1) SYNOPSIS (-i [breadth], --interleave-width)
OpenBSDendianness note and --reverse-bytesThe Solnix page points to --reverse-bytes as a way around the endianness limit. The OpenBSD page has no such pointer, and --reverse-bytes is not in its synopsis.
Source: Solnix objcopy(1) DESCRIPTION, SYNOPSIS; OpenBSD objcopy(1) DESCRIPTION, SYNOPSIS
Linux, OpenBSDin-place defaultWithout outfile, GNU objcopy on Solnix, Linux and OpenBSD writes a temporary file and renames it over infile, replacing the original. FreeBSD llvm-objcopy also modifies the input in place.
Source: Solnix, Linux and OpenBSD objcopy(1) OPTIONS (infile, outfile); FreeBSD objcopy(1) DESCRIPTION
FreeBSDexit statusFreeBSD documents that it exits non-zero on error and 0 otherwise. The Solnix page in the bundle has no EXIT STATUS section.
Source: FreeBSD objcopy(1) EXIT STATUS; Solnix objcopy(1) (no such section in the bundle)

Standards

  • POSIX: objcopy is not a POSIX.1-2024 utility.

Writing portable scripts

  • Stick to the options common to all four: -O, -I, -S, -g, -R, -j. Use only these in portable scripts, and test them with llvm-objcopy on FreeBSD.
  • Always give an explicit outfile. Without it, GNU objcopy and llvm-objcopy both overwrite the input file.

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.