Repository navigation
fix(relinker): audit dependencies without imported functions - #4916
Conversation
789e070 to
d92f47c
Compare
|
I've listed #4425, #4559, and #4606 in this PR's Depends on. I will take #4916 after all three, following the existing #4425-before-#4606 agreement; #4559 can land at any point before #4916. I'll rebase this PR once those changes are in main. Please let me know if that conflicts with your planned order. I checked a separate integration checkout on main
All 58 focused audit tests completed successfully on Windows (56 passed, 2 POSIX-only skips) and Linux (57 passed, 1 Windows-only skip). The zero-import executable/guest-module relinker fixtures passed on both platforms as well. This is validation of the pinned integration checkout, not of a future rebase or a full build of the other PRs. The published branch carries only our contribution. I made our dependency parameter keyword-only to avoid consuming #4559's module argument positions, and replaced our placeholder module fixture with a valid ELF that #4559 can inspect. After rebasing onto main AI-assisted: yes (Codex). |
|
No conflict with my planned order. The current heads of #4425, #4559, and #4606 are still open, and I agree with the proposed sequencing: keep #4425 ahead of #4606, let #4559 land before #4916 at any point, then rebase #4916 after all three are in |
|
Confirmed on our side. #4606 only adds a Thanks for checking the combined checkout and for preserving the |
d92f47c to
687be2d
Compare
|
Rebased #4916 onto current main #4559 and #4606 are now merged. Their module imports/exports, module-aware reference count, registry order, and I added regression cases for an executable and a secondary executable with different zero-import dependencies, followed by resolving the dependency through a shared bundled module, in both Linux and Windows output formats. Full build/test validation ran on
Depends on now lists only #4425, which remains open. I also checked a separate integration checkout combining tested head AI-assisted: yes (Codex). |
687be2d to
7e40354
Compare
|
Flagging from the other side of the overlap bot: #5269 adds a #5269 is independent and already clean, while this PR waits on #4425, so #5269 can land first; I'll rebase it after #4916 if you'd rather go that way. The published head of #4916 keeps the AI-assisted: yes |
7e40354 to
2e24529
Compare
|
Agreed, @Nixitov: #5269 can land first. #4916 now lists both #4425 and #5269 in Depends on; those two are independent, and I will rebase after both land. I reproduced the #5269 conflict in a separate checkout. The resolution keeps the expected strong entry's Pinned validation used main
The published branch is rebased onto main AI-assisted: yes (Codex). |
2e24529 to
22b190a
Compare
|
Rebased onto main #4425 is now merged. I resolved the JSON-report conflict by retaining Validation on the rebased head, using Release relinker-only builds:
Depends on now lists only #5269. I refreshed the separate integration checkout against its head No full emulator build, title runtime, or GPU testing was performed. AI-assisted: yes (Codex). |
|
macOS data point, as a third host next to the Windows and Linux runs. Apple M2 Max, macOS 27.2 (26B5091g), AppleClang, Ninja Release, relinker-only. Head
Not checked here: the combined checkout with #5269. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine. |
22b190a to
b2c9e91
Compare
|
#5269 is merged, so I rebased this onto current |
What
import_audit.pycan report a converted title as complete when it still needs a library with no imported functions, such asParty.prxin #2776. The import registry has no entries for that dependency.With
--registry, the relinker now writes a companion<prefix>.needed.jsonfor each converted executable (including--executableoutputs) and guest module. It contains the host dependencies retained after bundled guest providers and their aliases are resolved. The audit reads these companions and reports missing dependencies with zero imports. Existing registry arrays and audits of older registries remain supported.Companion files receive the same input-preservation checks as import registries, and a failed Windows PE patch preserves existing registries and companions. This improves the diagnostics associated with #2776; it does not claim to fix Resident Evil 4's runtime stops. The audit conservatively flags a missing dependency even when the Windows loader can omit it because it has no imports.
Overlap coordination
#4425, #4559, and #4606 are merged. This PR is rebased onto main
0defec438. The JSON-report conflict retainsdependency_registries,needed_libraries,stops, and module-aware reference counts, and passes the complete result to main's atomicwrite_json(args.json, result). Upstream input validation, output-directory checks, Linux runpath validation, Windows resource handling, conversion diagnostics, and progress reporting are preserved.#5269 remains the only merge-order dependency, following its author's proposed order. Its call-registry test overlaps our companion assertion. The tested combined resolution keeps
weak: falsein the expected strong-import entry, theweak: truefixture, and the.needed.jsonassertion forlib.so. Its commits are not included in this branch; this PR will be rebased after it lands.Tested
22b190ae0, based on main0defec438.long_paths, because Windows long paths are disabled), 0 failed.7420d0e89combines this head with fix(tools): do not report weak imports as a title's current stop #5269 atb9acf3480. Release relinker builds and all seven relevant CTest targets passed on Windows and Linux:call_registry,guest_registry,needed_libraries,weak_imports,input_preservation,import_audit, andconversion_diagnostics. Its 62 audit tests completed successfully on each OS, with 2 POSIX-only skips on Windows and 1 Windows-only skip on Linux. This validates the pinned combined checkout, not a future rebase.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)