SELFish User Guide

Cross-cutting reference for how SELFish behaves under the hood — command syntax, portable mode, format axes, diagnostic checks, and common error recovery. Per-format pages live alongside; this page covers tool-wide usage.


The Four-Axis Command Line

Packaging in SELFish is always one invocation along four clear axes:

selfish --input <file> --target <generation> --format <format> --output <path>

1. --target <generation>

Sets the platform hardware generation. Never defaulted, because a container stamped with the wrong generation's magic bytes will be rejected by target hardware:

2. --format <format>


Paths and Portable Mode

SELFish reads and writes only the paths specified on the command line:


Diagnostics & Inspection

SELFish includes built-in diagnostic tools to inspect unknown binaries:

# Inspect container header and segments
selfish container build/eboot.bin

# Inspect NID import hashes
selfish imports build/my_app.elf

# Check relocations
selfish reloc build/my_app.elf

Error Recovery

unsupported relocation type R_X86_64_...

missing entry point in ELF