elfdump(1) on Solnix vs Linux and the BSDs
On Solnix, elfdump is the illumos elfdump at /usr/bin/elfdump, an ELF inspector with its own option letters. Many letters mean something else on Linux readelf/objdump and on FreeBSD elfdump (-h, -e, -d, -s, -S, -l, -p, -w), and with no options it dumps everything.
The manual pages
- Solnix: elfdump(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: readelf(1) binutils-2.46 (different command, similar job)
- Linux: objdump(1) binutils-2.46 (different command, similar job)
- FreeBSD: elfdump(1) 15.1-RELEASE
- FreeBSD: readelf(1) 15.1-RELEASE (different command, similar job)
What Solnix runs
A default Solnix system runs the illumos elfdump at /usr/bin/elfdump; no other variants are shipped. The page says dump(1) has an older, less friendly interface but may suit shell scripts better. OpenBSD and NetBSD have no counterpart page in the bundle.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | no-option behaviour | Solnix elfdump with no narrowing options displays all available information for each object. Linux readelf needs at least one option besides -v or -H, and objdump needs one from its listed set (-a, -d, -f, -h and others).Source: Solnix elfdump(1) DESCRIPTION; Linux readelf(1) OPTIONS; Linux objdump(1) OPTIONS |
| FreeBSD | dump everything | FreeBSD elfdump has -a to dump all information, and its synopsis requires -a, -E or one of -cdeGhinprs. Solnix has no -a in its synopsis; running elfdump with no options gives the full dump.Source: FreeBSD elfdump(1) SYNOPSIS, -a; Solnix elfdump(1) SYNOPSIS, DESCRIPTION |
| FreeBSD | -d meaning | Solnix elfdump -d dumps the contents of the .dynamic section. FreeBSD elfdump -d is documented as dumping dynamic symbols. On Solnix, symbol tables including SHT_DYNSYM come from -s, and -N .dynsym selects the dynamic table.Source: Solnix elfdump(1) -d, -s, -N; FreeBSD elfdump(1) -d |
| Linux | -h, -e, -S, -l meanings | Solnix: -h hash table, -e ELF header, -S symbol sort sections, -l long section names. Linux readelf: -h file header, -e all headers (file, program, section), -S section headers, -l program headers. The same letters give different output.Source: Solnix elfdump(1) -h, -e, -S, -l; Linux readelf(1) -h, -e, -S, -l |
| Linux | section and program headers | On Solnix, -c dumps section headers and -p dumps program headers. On Linux readelf, -c shows the archive index and -p dumps a section as strings, taking a number or name.Source: Solnix elfdump(1) -c, -p; Linux readelf(1) -c, -p |
| Linux, FreeBSD | -w meaning | Solnix has -w file, mutually exclusive with -p; the visible text does not say more. FreeBSD -w file writes output to a file. Linux readelf -w is a DWARF debug dump.Source: Solnix elfdump(1) SYNOPSIS, -p; FreeBSD elfdump(1) -w; Linux readelf(1) -w, --debug-dump |
| Linux, FreeBSD | -I, -T, -v, -H, -P letters | Solnix -I takes an index or range and -T a type, to select sections or program headers. Linux readelf uses -I for the histogram, -T for silent truncation and -v for version; llvm-readelf on FreeBSD also uses -I for the histogram.Source: Solnix elfdump(1) -I, -N, -T; Linux readelf(1) -I, -T, -v; FreeBSD readelf(1) --histogram, -I |
| Linux, FreeBSD | selecting by index or name | Solnix has -I index-expr (for example -I 3:5, or -I 10: to the end), -N name and -T type. With -p, -N matches the program header type, such as PT_INTERP. readelf takes a section number or name as an argument to -x, -p or -j.Source: Solnix elfdump(1) -I, -N; Linux readelf(1) -x, -p, -j; FreeBSD elfdump(1) OPTIONS |
| Linux, FreeBSD | Solaris-specific sections and OS ABI | Solnix elfdump decodes SUNW sections: capabilities (-H), move (-m), syminfo (-y), symbol sort (-S), verdef/verneed (-v). With -O osabi it picks the ABI; without it, an object with a .note.ABI-tag is treated as linux, otherwise as solaris.Source: Solnix elfdump(1) DESCRIPTION table, -O; FreeBSD elfdump(1) OPTIONS |
| Linux, FreeBSD | notes in core files | On Solnix, -n shows .note sections as hexadecimal unless the file is a core file, where a listed subset (NT_PRSTATUS, NT_PRPSINFO, NT_AUXV, NT_ZONENAME and others) is shown in a high-level format. The FreeBSD page only says -n dumps note sections.Source: Solnix elfdump(1) -n; FreeBSD elfdump(1) -n |
| FreeBSD | -E ELF test | FreeBSD elfdump -E returns success if the file is ELF and failure if not, and is exclusive with other options. Solnix elfdump has no -E.Source: FreeBSD elfdump(1) -E; Solnix elfdump(1) SYNOPSIS |
| Linux, FreeBSD | disassembly and output style | The Solnix elfdump page documents no disassembly option, while Linux objdump has -d, -D and -S. FreeBSD readelf is llvm-readelf, which also offers --elf-output-style with LLVM, GNU (default) and JSON; elfdump has no such option.Source: Linux objdump(1) -d, -D, -S; FreeBSD readelf(1) --elf-output-style; Solnix elfdump(1) SYNOPSIS |
Everyday tasks
| Task | Solnix | Linux | FreeBSD |
|---|---|---|---|
| dump everything | elfdump file | readelf -a file | elfdump -a file |
| show the ELF header | elfdump -e file | readelf -h file | elfdump -e file |
| show section headers | elfdump -c file | readelf -S file (objdump -h file) | elfdump -c file |
| show program headers | elfdump -p file | readelf -l file | elfdump -p file |
| show the dynamic section | elfdump -d file | readelf -d file | — |
| show the symbol table | elfdump -s file | readelf -s file | elfdump -s file |
| show only the dynamic symbols | elfdump -N .dynsym file | readelf --dyn-syms file | elfdump -d file |
| show relocations | elfdump -r file | readelf -r file | elfdump -r file |
| show notes | elfdump -n file | readelf -n file | elfdump -n file |
| show the interpreter | elfdump -i file | — | elfdump -i file |
| hex dump a section | — | readelf -x section file | — |
| test whether a file is ELF | — | — | elfdump -E file |
Standards
- POSIX: elfdump is not a POSIX.1-2024 utility.
- FreeBSD: The FreeBSD page cites the System V Application Binary Interface and says in BUGS that elfdump does not fully implement the ELF gABI.
- Solnix: The page points to the Linker and Libraries Guide for a full description of the displayed information.
Writing portable scripts
- Do not rely on elfdump option letters across systems; the same letter (
-h,-e,-d,-S,-l,-p,-w) selects different output on Solnix, Linux readelf and FreeBSD elfdump. Test which tool exists and use its own options. - Use full long options with readelf where possible (
--file-header,--program-headers); Solnix elfdump has no long options.
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.