Basic syntax
relinker [options] <input.elf> <output>Linux ELF is the default output format even if the filename ends in .exe. To create Windows PE, use --windows. The input must be a clean ELF with bundled ELF modules in supported sibling directories.
# Linux target
./relinker source/input.elf app.elf
# Windows target (example with renamed executable)
.\relinker.exe --windows source\input.elf app.exeRelevant options
| Option | Purpose |
|---|---|
--windows | Generate a Windows PE executable. |
--to-intel | Convert supported AMD-specific instructions for Intel hosts; not universally guaranteed. |
--windows-diagnostics | Startup dependency diagnostics; requires Windows output. |
--registry | Emit import metadata in an adjacent .registry.json file. |
--rpath <path> | Change runtime host-library lookup location from default $ORIGIN/libs. |
--autorun | Launch generated output after conversion; requires a prepared matching runtime. |
unused-filter=0|1|2 | Control import filtering. Syntax is without --; default 0. |
Deprecated flags such as --skip-sce-module and --lazy-binding are debug-only and may produce severely unstable output. The upstream tool does not define a standard --help switch; invoking without arguments prints syntax and exits with an error.
Diagnose missing imports with the audit tool
The upstream repository includes a Python 3 script for identifying imported functions that are implemented, stubbed, absent, or provided by bundled modules. The audit is a static dependency check, not gameplay proof.
relinker --registry source/input.elf app.elf
python3 tools/import_audit.py app.registry.json \
--libs build/core/libs/libs \
--modules source/sce_moduleThe script is in the upstream repository and requires access to built host libraries. A passing static audit cannot verify rendering, input, audio, or saves.
Controllers and keyboard mapping
SDL-recognized controllers map to standard PS-style inputs. For keyboard customization, create anyps5-input.ini next to the converted executable. Example:
Cross = KEY:F
Cross = KEY:Space
LeftStickLeft = KEY:J
LeftStickRight = KEY:L
LeftStickUp = KEY:I
LeftStickDown = KEY:K
Square = MOUSE:LeftA missing configuration file is fine (built-in bindings apply). An invalid line can stop input initialization. Touchpad click is forwarded for compatible controllers, but finger coordinates are not implemented. Full details: official input mapping reference ↗.
System fonts and GPU choice
Games relying on PS5 system fonts may need a local anyps5-fonts/ directory with properly licensed substitutes. The upstream document lists accepted Noto fonts. AnyPS5 selects the first usable Vulkan 1.1 device and prefers a discrete GPU; ANYPS5_GPU can select another detected device by name. Neither feature guarantees game compatibility.
Relinker exit codes
0 means conversion succeeded; 1 means invalid arguments; 2 means conversion failed, with details printed to stderr. --autorun may instead return the launched application's exit status.