Repository navigation
fix(relinker): resolve kernel variant imports via canonical kernel - #8867
Conversation
|
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.
|
|
Manual overlap review for the bot warning: #3965 changes |
|
Windows run of fef2755, the part the description lists as not run: the synthetic startup-import reproducer from #8853, executed. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,
On this head |
|
Thanks for running the synthetic reproducer on Windows. That fills the platform gap I called out: both scoped kernel variants now resolve on the PR head, the canonical libkernel control remains green, and the two focused relinker tests pass. The retail-title limitation is clearly stated. |
|
Thanks for running the Windows reproducer. This closes the host coverage gap I had called out: both kernel variants now reach the guest entry, while the libkernel control still passes on main. I will keep the console and title limitation clear. |
|
Follow-up for the variant-only Validation on the updated PR head: the new |
|
Windows run of 7fdad07, the part the follow-up lists as not run: the variant-only dependency closure UnhealthyKraken reported on #8853, executed, plus the Windows-only dependency-diagnostics test. Same host and toolchain as my run above (Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 ucrt-posix-seh r7, Release,
On this head |
|
Thanks for running the updated head against the variant-only |
|
Checked the provider order (requested variant, canonical libkernel, libc) in |
Resolves the conflict with boykopovar#8867 in EntryStubTests.cpp: keep its two kernel-variant tests and the BufferUtils include, and this branch's libSceAmpr-to-libc fallback test, with all three called from main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
The Windows relinker already adds canonical
libkernel.prxwhenlibkernel_web.prxis a dependency, but not forlibkernel_sys.prx. Also, a scoped host import from either variant searched only that variant (and the existing libc fallback), even if canonical libkernel was loaded. This made a syntheticgetpagesizeimport fail when scoped tolibkernel_sys.prxorlibkernel_web.prxdespite canonical libkernel exporting it.Load canonical libkernel for either variant and search a scoped variant import in this order: the requested variant, canonical libkernel, then the existing libc fallback. This keeps requested-provider precedence and does not search guest modules as aliases. Regression coverage checks the generated search order and both variant dependency lists. The overlap report found shared source/test files with #3965, #7594 and #7532; manual diff review shows their startup-stack/MXCSR changes are separate from this provider-resolution behavior. This PR does not depend on them.
Tested
Linux x86-64, GCC 12.2, relinker-only Ninja build:
cmake -S . -B build -G Ninja -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON -DANYPS5_RELINKER_CLI=ONcmake --build build --target entry_stub_tests -j4ctest --test-dir build -R '^entry_stub$' --output-on-failure: passed.python3 tools/check_conventions.py --base upstream/main: passed.python3 tools/pr_overlap.py --branch codex/kernel-variant-host-fallback: no duplicate behavior found; reported shared files were manually reviewed as described above.Not run: Windows execution of the synthetic startup-import reproducer or a retail title.
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)