fix(relinker): resolve versioned Mono module dependency #13143
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13143"
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 kyon-eth on 2026-10-30T04:13:48Z.
What
Resolve an import qualified as
libmonosgento the declaredlibmonosgen-2.0.prxdependency. Without this mapping, the relinker does not associate the import with that versioned dependency.The observed module and dependency identities record the matching dependency and module names in two version-labelled images (SHA-256
52e4ef63044494ed966e27f2d103f9a75235ac247a41b814bb67edfa527a03e8). The labels do not authenticate retail firmware provenance. Other Mono version numbers retain their existing behavior.The overlap checker could not compare the shared CMake file against #5021, #9793 and #10792 because those branches conflict with main. Their added CMake lines do not define this test target.
Tested
Preserves the existing normalized-dependency match before trying the new alias; the guest-reader test includes a regression for a
-moduledependency.The mapping applies only in the observed direction; a regression case verifies that importing the physical provider name does not select the logical-name library. The updated macOS guest-reader test passes.
macOS x86-64: built and ran
import_module, including the guest image reader, the matching dependency, an unrelated version and ambiguous dependency rejection.Audited conventions, whitespace and open PR overlap.
No Linux, Windows, console or game run was performed.
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)Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:51:17Z.
Review: COMMENTED
Correction (2026-11-01): the title-ID/log demand below is not a CONTRIBUTING requirement;
Unblocks: noneis allowed. The technical points below are unaffected.Name-by-name alias in the matcher. The fix is
normalized == "libmonosgen" ? "libmonosgen-2_0" : normalizedinside the dependency lookup. The next PRs in this series (#13472, #13473, #13475, #13477, #13482, #13486) each rewrite the same function to add one more hard-coded pair (libSceLibreSSl3,libSceLibreSSL, ...). That is a growing list of module names seen in particular images, written asifbranches, not a rule for how the console's loader maps an import-module name to a dependency. What is the general rule (the loader's actual comparison, e.g. case folding or stripping the version suffix) and can the lookup implement that once? If it is not known, a data table with its source recorded indocs/dev/debtis better than a code branch per name.No title. "Unblocks" gives no title ID or log line showing an import of
libmonosgenfailing to resolve on main. The evidence is a gist about two image labels the body itself says do not authenticate provenance.Which dependency wins. The old loop threw when two dependencies had the same normalized name. In the new
findMatch(lookup)the alias is tried only after the direct match fails. If an image lists both a module that normalizes tolibmonosgenandlibmonosgen-2.0.prx, the direct match wins and the other is never considered, so the ambiguity check no longer fires for that pair. Please add a test with both present and say which one is expected to bind.