Repository navigation
fix(libkernel): export sysarch so modules that import it load - #6028
1 commit merged into
Conversation
fe884e6 to
d178d0a
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.
|
d178d0a to
183782d
Compare
183782d to
fb0f83d
Compare
|
Cross-validation on Windows of head Windows 11 Pro 26220, Ryzen 7 5700X, NVIDIA RTX 4070 (596.21), WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release.
Prospero Win (PPSA99995),
Suggestion: "Unblocks: none" could become "PPSA99995 on Windows, with #6102 and #6135", since that is where the stop line moves. Not checked: Linux, a console, any program run inside Prospero Win. Written with Claude Code assistance (validation by a subagent, reviewed in this session). |
The Wine port (PPSA99995) ships an ntdll module that imports sysarch (b7uXQmnfB2s). libkernel did not export it, so loading stopped with "undefined symbol: b7uXQmnfB2s" before the title ran. Export sysarch as a stub that reports that it is not implemented: the title loads and runs its launcher without calling it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fb0f83d to
162f4af
Compare
fbb76ae
|
@adriadam10 FYI: this landed through #7095, which carried this PR's commit fb0f83d, so GitHub now shows it as merged. I've added myself as co-assignee for the follow-up; you're still on it as before. |
What
The Wine port (PPSA99995,
prospero-win) does not start onmain:Update (10-15): since #5559 (merged 11:38), Linux and macOS defer a runtime-only module such as
ntdlluntil a module that needs it is used. Onmain940eba9 the title starts on Linux without this PR: its launcher, with an empty game library, does not loadntdllin a 40 s run (LD_DEBUG=files), so the error above no longer appears there. #5559 keeps eager loading on Windows, so there the load should still stop at this import (not checked here). On Linux, the import would only be resolved oncentdllis loaded, which my runs don't reach.b7uXQmnfB2sissysarch(tools/nid_names.py --nid b7uXQmnfB2s), the FreeBSD call that gets and sets the FS and GS bases. Itsntdllmodule imports it, and libkernel does not export it, so loading stops before the title runs.libkernel now exports
sysarchas a stub that reports that it is not implemented, next to the other unimplemented exports inUnimplemented.cpp. With it the title loads and runs its launcher, and it does not callsysarchin a 125 s run. An implementation would have to set the GS base througharch_prctlon Linux and could not on Windows or macOS, where the host owns that register, so that waits for a title that calls it.guest_sysarchchecks that the call reportssysarch not implemented. Without the export it does not link.Tested
Ubuntu 24.04, GCC 13.3 (CI's compiler), Release with CI's configure flags, on
main9f03c4f, then rebased ontomain358e218:guest_*tests pass,guest_sysarchincluded.--to-inteland run on Linux for 40 s; the builds differ only inlibkernel.prx:main: exits with 127 at 0 s on the error above./data/prospero-win/logs/session-0.log) records the keyboard and mouse modules opening, the data mount, an empty game library and the launcher's state (launcher video=state pad=ok hid=ok frame=1 apps=0).tools/check_conventions.py --base upstream/mainpasses, andtools/pr_overlap.py --branchfinds no overlap.@screamm checked it on Windows (RTX 4070, WinLibs GCC 15.2.0), alone and stacked with #6102 and #6135 on
main5d9dcc4. Windows still bindsntdll's imports at load. With #6102 and #6135 but without this PR, Prospero Win (PPSA99995) exits within 1 to 3 s onFAIL: unresolved ELF import b7uXQmnfB2s from libkernel.prx, 2 of 2. With all three, 2 of 2 runs reach the 125 s limit at its launcher's library screen, with no stop line.guest_sysarchpasses 3 of 3 and fails both negative controls. Of 1,093 relinked import registries from 51 titles, only PPSA99995 importssysarch.Not checked on a console.
Follow-up (10-17): #7095 builds on this PR and implements the GS base operations (
AMD64_SET_GSBASE,AMD64_GET_GSBASE,AMD64_GET_FSBASE), because Forever Launcher's Wine (PPSA99030) now callssysarch(AMD64_SET_GSBASE, ...)for its TEB. This PR stays the declaration that lets the modules load.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code