Repository navigation
fix(relinker): write Linux and macOS executables with execute permission - #5695
Conversation
|
macOS data point for the
I did not run a title, and the test only checks the Linux ELF outputs of AI-assisted: yes (Claude Code) |
|
Thanks @Bruggi-ch, that covers the half I couldn't build here. On the part you left open: I also built this PR together with my other open ones (#5053, #5218, #5699, #5734) on |
The executables were written with the default file mode (0644 under a 022 umask). The documented chmod covered app.elf, but not the outputs of --executable, so RetroArch (PPSA99169) converted with --executable picker/picker.bin --executable es-de/es-de.bin stopped as soon as it started its picker: sceSystemServiceLoadExec: execv failed: Permission denied Every executable output now gets execute permission for owner, group and others after it is written, as --autorun already did for app.elf. With it RetroArch starts the picker, and the picker starts ES-DE.
relinker_executables now requires the execute bits on app.elf and on picker.picker.bin.elf. It fails with the previous main.cpp, where both are 0644.
Keep it for copies that lost their mode, and name the LoadExec error a missing execute bit gives.
relinker_executables converts the picker case with --macos too and requires both Mach-O outputs to be executable. It fails when the permission change is limited to Linux outputs.
563ff63 to
acc228a
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Checked on the PR merged onto current |
What
The relinker writes its executables with the default file mode, 0644 under a 022 umask.
USAGE.mdsays tochmod +x app.elf, but nothing covers the outputs of--executable(#4786). A title that starts one of them withsceSystemServiceLoadExecthen stops at theexecv:main.cppadds execute permission for owner, group and others to each Linux and macOS executable output after writing it, the same bits--autorunalready adds toapp.elf. If that fails, the conversion fails and names the file.relinker_executableschecks the bits onapp.elfandpicker.picker.bin.elf.USAGE.mddrops thechmodstep and keeps it for copies that lost their mode (a browser download, for example), with the error a missing bit gives.Title. RetroArch (PPSA99169, catalog release) starts its frontend picker with
sceSystemServiceLoadExec("/app0/picker/picker.bin"), and the picker then starts ES-DE (/app0/es-de/es-de.bin). Converted with--executable picker/picker.bin --executable es-de/es-de.binand run after the documentedchmod +x app.elf, it stopped with the error above as soon as it started the picker. With this PR all three outputs are-rwxr-xr-xstraight from the relinker and RetroArch starts the picker. In an earlier run with the same bits set by hand, the picker also started ES-DE (itses-de-ps5.logreachesES-DE returned 0).Tested
Linux (Bazzite 44, GCC 16.2.1, Ninja, Release,
-DBUILD_TESTING=ON), based onmaind8888df9b:ctest: 1105 of 1106 pass.agc_driver_tessellationsegfaults on unchangedmainhere too.relinker_executablesfails with the previousmain.cpp(app.elfis0o100644).chmod. Before: theexecverror and SIGABRT when the picker starts. After: the picker starts and waits on its menu.tools/check_conventions.py --base upstream/mainandtools/pr_overlap.py(no overlap) pass. macOS and Windows were not built here. Windows outputs are not touched.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository