From 67cdc9edccf31bca032806120075071e96743693 Mon Sep 17 00:00:00 2001 From: nyavana Date: Sun, 11 Oct 2026 16:09:56 -0700 Subject: [PATCH] docs(relinker): correct help and exit-code usage Document --help output and status, distinguish no-argument errors, and include help in the successful exit code description. AI-assisted: yes (OpenAI Codex). --- docs/user/USAGE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/user/USAGE.md b/docs/user/USAGE.md index 3ff968d17..22e8326f7 100644 --- a/docs/user/USAGE.md +++ b/docs/user/USAGE.md @@ -43,6 +43,7 @@ All switches are disabled by default. `unused-filter` defaults to `0`; `--rpath` | Option | Effect | |-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `--help` | Print usage to stdout and exit with code `0`; input and output paths are not required. | | `--windows` | Produce a Windows PE executable. | | `--macos` | Produce an x86-64 Mach-O executable, with bundled modules as Mach-O libraries in `app0/sce_module`. Conflicts with `--windows`. | | `--windows-diagnostics` | Include startup dependency diagnostics. Requires `--windows`. | @@ -63,7 +64,7 @@ All switches are disabled by default. `unused-filter` defaults to `0`; `--rpath` | `--trap-sdk-syscall-stubs` | Replace the exact ps5-payload-dev generic and numbered syscall wrapper stubs with `UD2`, so unused wrappers do not block relinking. Other syscall instructions still cause an error. If a trapped wrapper runs, it raises an illegal-instruction exception. For debugging only. | | `--lazy-binding` | Deprecated. Enable lazy symbol binding instead of eager binding. Incompatible with bundled ELF modules. | -Specify `unused-filter=0|1|2` without `--`, at most once. Unknown options and extra positional arguments are errors. There is no `--help` flag; invoking `relinker` without arguments prints the usage syntax and exits with an error. +Specify `unused-filter=0|1|2` without `--`, at most once. Unknown options and extra positional arguments are errors. Use `relinker --help` to print the usage syntax to stdout and exit with code `0` without converting files. Invoking `relinker` without arguments prints the usage syntax to stderr and exits with code `1`. The `--skip-sce-module`, `--exclude-sce-module `, `--skip-syscall-check`, and `--lazy-binding` flags are deprecated. If the application runs with these flags enabled, it will be extremely unstable and unsuitable for general use. These flags are only for debugging. @@ -146,7 +147,7 @@ GPU results in storage images and render targets stay on the GPU until something ## Exit codes -`0`: conversion succeeded. `1`: invalid arguments. `2`: conversion failed; the error is printed to stderr. With `--autorun`, successful conversion returns the launched application's exit code. +`0`: conversion succeeded or help was displayed. `1`: invalid arguments. `2`: conversion failed; the error is printed to stderr. With `--autorun`, successful conversion returns the launched application's exit code. ## Import audit