addr2line(1) on Solnix vs Linux and the BSDs
addr2line is not in the Solnix base system: install pkgs.solnix.binutils. The Solnix page is the same text as the Linux binutils page, so Linux users see no difference. FreeBSD ships llvm-addr2line, an alias for llvm-symbolizer, with different defaults.
The manual pages
- Solnix: addr2line(1) from
pkgs.solnix.binutils - Linux: addr2line(1) binutils-2.46
- FreeBSD: addr2line(1) 15.1-RELEASE
What Solnix runs
Not installed by default: add pkgs.solnix.binutils. The bundle shows no illumos variant of addr2line on PATH and lists no other variants.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | same program | The Solnix page and the Linux binutils-2.46 page have the same NAME, SYNOPSIS, options and behaviour text. Both use the GNU binutils addr2line. The part of the Linux page after the @file text was trimmed in the bundle, so it was not compared. Source: Solnix addr2line(1) SYNOPSIS, OPTIONS; Linux addr2line(1) SYNOPSIS, OPTIONS |
| FreeBSD | implementation | FreeBSD's addr2line page describes llvm-addr2line, an alias for llvm-symbolizer(1) with different defaults. It is meant as a drop-in replacement for GNU addr2line, which is what Solnix installs from binutils. Source: FreeBSD addr2line(1) NAME, DESCRIPTION; Solnix addr2line(1) NAME |
| FreeBSD | function names (-f) | The Solnix binutils page documents -f as showing function names. The FreeBSD page says llvm-addr2line does not print function names by default and needs -f. The Solnix text does not say whether -f is on by default.Source: FreeBSD addr2line(1) DESCRIPTION (-f); Solnix addr2line(1) -f |
| FreeBSD | demangling (-C) | On Solnix, -C or --demangle is an option that decodes C++ names. On FreeBSD, llvm-addr2line does not demangle by default and -C switches it on. The Solnix page documents -C as an option and gives no default.Source: FreeBSD addr2line(1) DESCRIPTION (-C); Solnix addr2line(1) -C, --demangle |
| FreeBSD | inlined frames (-i) | On FreeBSD, llvm-addr2line does not print inlined frames unless -i is given. Solnix documents -i as printing source information for all enclosing scopes of an inlined function. Pass -i explicitly in scripts for the same output on both.Source: FreeBSD addr2line(1) DESCRIPTION (-i); Solnix addr2line(1) -i, --inlines |
| FreeBSD | address parsing | FreeBSD llvm-addr2line reads all addresses as hexadecimal and ignores an optional 0x prefix. The Solnix page says it accepts hexadecimal addresses or symbol+offset. The FreeBSD page does not mention symbol+offset input. Source: FreeBSD addr2line(1) DESCRIPTION (first bullet); Solnix addr2line(1) DESCRIPTION |
| FreeBSD | environment variable | FreeBSD llvm-addr2line reads default options from LLVM_ADDR2LINE_OPTS. The Solnix page documents no environment variable. It does document @file, which reads options from a file. Source: FreeBSD addr2line(1) DESCRIPTION (last bullet); Solnix addr2line(1) @file |
| FreeBSD | output style | FreeBSD llvm-addr2line uses --output-style=GNU by default, so its output is meant to match GNU addr2line, as on Solnix. The FreeBSD page here lists no option flags beyond that, so check llvm-symbolizer(1) for the rest.Source: FreeBSD addr2line(1) DESCRIPTION (--output-style=GNU), SEE ALSO; Solnix addr2line(1) DESCRIPTION |
| FreeBSD | option documentation | The FreeBSD page gives only 'llvm-addr2line [options]' and lists no flags. The Solnix page lists -a, -b, -C, -e, -f, -s, -i, -j, -p, -r, -R and their long forms. Whether FreeBSD accepts -a, -b, -j, -p, -r or -R is not stated.Source: FreeBSD addr2line(1) SYNOPSIS; Solnix addr2line(1) SYNOPSIS, OPTIONS |
Standards
- POSIX: addr2line is not a POSIX.1-2024 utility.
Writing portable scripts
- Pass
-f,-Cand-iexplicitly if you need function names, demangling and inlined frames. FreeBSD's llvm-addr2line has all three off by default. - Give addresses as plain hexadecimal, with
-enaming the executable, for the most portable use.
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.