New flags
--language — force Ghidra language ID (e.g. x86:LE:32:default, ARM:LE:32:v7) for raw or unknown binaries
--compiler — force compiler spec (requires --language)
--list-languages — enumerate all available language IDs and their compiler specs; pipe to grep to filter
--entry — mark an address as the program entry, disassemble from it, create an entry function before analysis runs
Behavior changes
- Analysis pipeline reordered to
open → rebase → mark entry → analyze → export. Previously --base-addr applied after Ghidra's auto-analysis, so function boundaries, xrefs, and switch-table recovery were inferred at the wrong addresses. Auto-analysis is now triggered manually after the image base and entry point are set.
Error handling
- Clean error messages on load failure instead of JPype tracebacks. Specifically detects Ghidra's
No load spec found and hints at --language / --list-languages.
Example — raw x86 firmware
ghidra-decomp ./firmware.mod \
--language x86:LE:32:default \
--compiler gcc \
--base-addr 0x00031000 \
--entry 0x00031000