fix(relinker): preserve inputs when writing desktop assets #3678
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3678"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-11T15:13:10Z.
What
When producing a Linux executable with an icon, the relinker could overwrite the input ELF or a converted module through the generated
<output>.pngor<output>.desktoppath, including hard links and symbolic links, while returning success.Check those paths against the input executable and module sources before writing any output. Reuse the existing registry-output validation and retain replacement of unrelated existing outputs. Extend the existing input-preservation test and document the output collision rule.
Tested
Windows, WinLibs MinGW-w64 GCC 15.2.0 UCRT/POSIX/SEH r7, Release, relinker-only build, based on main
a11c8f7f70a0ed4e71504a89de69e8cdae687817.input_preservationtest failed before the fix and passed after it.--registry. Each checks that input bytes and existing outputs remain unchanged and no converted module output is written.git diff --check: passed.Linux ELF output generation was tested on Windows. Native Linux/macOS builds and game execution were not tested.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:49:54Z.
Checked on Linux: relinker build + ctest 101/101 green; the extended
input_preservationtest fails without themain.cppchange and passes with it. The icon/desktop-entry checks run before any output is written, and reuse the registry validation. Merging.