fix(relinker): resolve internal libc imports from guest libc #1454
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1454"
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 mrk1987 on 2026-10-08T07:23:25Z.
What
Windows import resolution for
libSceLibcInternal.prxsearches native internal/libc providers but omits the title's bundled guestlibc.prx. SDK C++ namespace exports supplied by that runtime therefore remain unresolved.Append the existing converted guest libc provider after native providers for internal-libc imports. This uses a real exported implementation: if all providers lack the symbol, startup still fails with the unresolved-import diagnostic. Other libraries retain their existing module scope.
Tested
Windows, MinGW-w64, Release relinker build on upstream main
6b573862. Three tests pass:windows_import_modules,guest_module_directories, andtls_function_coverage.The import test adds execution cases for guest-only resolution, native internal-libc priority, native libc priority, and an absent symbol that still fails startup. Existing module-scope and missing-dependency cases also pass.
tools/check_conventions.pyandgit diff --checkpass.This resolved an SDK C++ import during local startup testing with a retail title. No playable-game claim. No experimental NP exports or game files are included.
The test additions are positioned separately from #1153;
git merge-tree --write-treeconfirms a clean merge with its current head. The relevant test and conventions checks pass after relocating the additions.Checklist
main; no other open PR implements the same functionsImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T14:07:30Z.
Checked build + full ctest on Linux merged onto current main (459/459), and the diff against the description: the guest
libc.prxprovider is appended after the native providers only forlibSceLibcInternal.prximports, so native priority is unchanged and an absent symbol still fails startup.The new cases only execute on Windows (
os.name == 'nt'), so thewindowsCI job is what covers them; merging once it is green.