Repository navigation
fix(relinker): retain declared import library identities - #1617
eliasbruno124-dev wants to merge 7 commits into
Conversation
|
Verified the same way as #1503 — by replaying the merge and running the fields, not by reading the diff. Scope and replay. This PR's own change is the single commit Negative control. Reverting only the three implementation files to So the regression does gate this change: on the #1503-only tree the owner is dropped and the colliding provider answers 11 instead of 22, which is the failure your body describes. Not a duplicate. I checked the symbol rather than the topic: The new failure modes are pinned by tests, which is the right call. The refactor widens the throwing surface: One question, since that boundary moved. An empty owner means "treat this as a host-side import" downstream, and it used to be reachable for any symbol whose library qualifier was not a declared dependency. Now the same input throws if the qualifier is not declared at all. That is fine if PS5 toolchains always emit a Everything else checks out: the Neither PR has a maintainer review: this one has no reviews and no comments at all, and #1503's single approval carries no review body. Both are green and mergeable and land in order without conflict, so the pair is a clean unit of work for whoever reviews next. Written with AI assistance. |
|
@Dextroid17 Confirmed against the retained original Castlevania metadata: all 1,525 qualified undefined symbol entries across its 13 code files reference declared import library and module IDs. No undeclared-library case was observed. The broader bounded check covered 23,736 entries across 141 files, with 12 other inventoried files not covered; this does not establish a universal toolchain guarantee. The body now states that distinction and the fallback/error boundary explicitly. Updated to the corrected #1503 parent, preserving module precedence and adding .sprx library-owner coverage. Current head 847feac passes all 38 registered groups locally on Windows; the identical final fixture still fails on the parent with the wrong-provider result. New CI is running. AI-assisted: yes |
|
Checked the update at The 23,736/141/12 scoping is the right way to state it: it answers my question about the undeclared-library boundary without turning one title's inventory into a universal claim. Nothing further from me on this one either. Written with AI assistance. |
|
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.
|
|
Closing: on top of #1503 this doesn't change a title run (PPSA27836 has the same missing imports either way), and the colliding-provider case only exists in the synthetic test. Please reopen with a title where main binds an import to the wrong provider. |
What
Depends on #1503. This branch contains its corrected head
188dd9f5f814d2f258c5ac04775ba42ec80374c5and main4b005b229e24be9ec3f185def9e59cbc03aa9e4a. The library-owner change remains 98d9184b; merge #1503 first. The update preserves the generalized module/library resolver and includes the parent's.sprxhandling, with additional library-owner tests.When an import's module name does not match a declared dependency, the relinker drops its owner even if the library qualifier identifies that dependency. On Windows a colliding export can then bind to the first unrelated provider. The regression returns 11 from that provider instead of 22 from the declared one.
Read
DT_SCE_IMPORT_LIBin both executable and guest readers. If module resolution finds no dependency, resolve the library qualifier against the existing dependency list. Exact and normalized module matches retain precedence. When module resolution succeeds, the library qualifier is not used. Otherwise, no library table or a declared library without a matching dependency retains the broad fallback requested in #684. A referenced ID missing from an existing library table is malformed and throws, as do invalid names and ambiguous matches. No libraries, export implementations or title-specific aliases are added.Original input PPSA27836 / 01.000.001 demonstrates the mismatch: imports declare module
libSceJson, librarylibSceJson2, and dependencylibSceJson2.prx.Tested
ANYPS5_RELINKER_ONLY=ON,BUILD_TESTING=ON. Corrected parent188dd9f5: 37/37 registered groups pass. Current commit847feacc09bec211d8025002102e63e812137cb5: 38/38 pass, without failures or skips. Conventions andgit diff --checkpass. CI for this exact head passes the Linux and Windows full builds/tests and the relinker jobs on Linux, Windows and macOS..prx/.sprx/.suprxand native spellings, duplicate/invalid IDs, malformed metadata, ambiguous names, unresolved symbols and the existing fallback. The PR1503 identity regression also passes.7d3b3930. All 1,815 emitted import occurrences / 896 unique queries were inspected: 84 previously unqualified owners now agree with the original library metadata and declared dependencies (62 Json2, 7 AppContent, 7 SaveDataDialog.native, 8 MsgDialog.native); the other 812 records are unchanged. Inputs and host binaries retain their hashes. Original filenames and HDD content were not changed.4b005b22and the corrected fix(relinker): discover required guest module identities #1503 parent. The shared resolver conflict was resolved locally and the result was tested above.Overlap rechecked on October 9 against main
f1451396: this branch and #1815 merge cleanly together. Both inherit #1503 (188dd9f5), including the identicaltest_guest_module_identity.py; neither follow-up depends on the other. This branch also merges cleanly with that main.Checklist