Repository navigation
fix(relinker): load a libSceSsl2 dependency as libSceSsl - #26765
nikmparis217-ux wants to merge 1 commit into
Conversation
catminou4
left a comment
There was a problem hiding this comment.
Reviewed locally (Ubuntu 22.04, GCC 11.4, relinker-only build -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON).
-
ctest -R '^(import_audit|import_module|linux_named_imports|windows_named_imports|linux_guest_named_imports|windows_import_modules)$': 6/6 pass on the PR head. -
Control: restored
core/relinker/domain/include/domain/ImportModule.hppandtools/import_audit.pyfromorigin/main, rebuilt:import_module,import_audit,linux_named_importsandwindows_import_modulesall fail (new checks 95-98,test_ssl2_dependency_uses_libscessl, thessl2case and thelibSceSsl2.*alias cases). Restoring the PR sources makes them pass again, so the tests isolate the alias. -
The alias follows the existing
libSceGnmDriver_padebugpattern in all three places (NeededLibraryName, theImportModulelookup,import_audit); check 98 confirms an exactlibSceSsl.prxdependency still wins over the alias when both are present. -
I could not check the 13.52 module tables myself; the debt fragment states that the equivalence is read from dynamic tables, not run, which is the right caveat.
-
tools/pr_overlap.py --branch pr-26765: no confirmed overlap; it fails closed on 6 old PRs (#13472, #13473, #13475, #13477, #13482, #13486) that touchImportModule.hppandImportModuleTests.cppbut no longer merge cleanly withmain, so they could not be compared.
Verdict: mergeable.
|
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.
|
c3fed27 to
6449754
Compare
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed change consistently maps libSceSsl2 dependencies to libSceSsl and includes targeted regression cases; no blocking defect was found in the code read.
What I ran
No build or tests were run in this review. I read the prepared diff and all seven changed files included in the review bundle at head 64497547d6808bf35f6b46044ee8fc5c015aeae2.
Results
| Check | Result | Note |
|---|---|---|
| Changed code review | passed | All changed files read |
| Build and tests | not run | Results in the description are author-reported |
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests were run independently. Hardware and console behavior were not verified. The author-reported test results and firmware dynamic-table inspection were not independently confirmed.
To get this to a good state
Nothing is required.
What
The PS4 version of Gran Turismo 7 (CUSA24767 01.71) needs
libSceSsl2.prxand imports 13sceSsl*functions from modulelibSceSsl. AnyPS5 has nolibSceSsl2library, so onmainthe needed library has no file and the 13 imports have no provider:tools/import_audit.pycounts all 13 as absent.On the console the two modules use the same names. In PS4 firmware 13.52,
libSceSsl2.sprxnames both its module and its export librarylibSceSsland exports 57 symbols, among them all 13 that this title imports. That firmware'slibSceSsl.sprxhas the same names and 208 symbols. AnyPS5'slibSceSslexports all 13.A
libSceSsl2dependency, with any module suffix, is now loaded aslibSceSsl.prx, and imports from modulelibSceSslmatch alibSceSsl2dependency. This works like the existinglibSceGnmDriver_padebugalias inNeededLibraryNameandImportModule.tools/import_audit.pyapplies the same alias. The debt entry records that the names come from the dynamic tables of the two modules, not from running them, and that no PS5 module of that name was read.Tested
Windows 11, WinLibs GCC 16.2.0, Release, relinker-only build (
ANYPS5_RELINKER_ONLY=ON,BUILD_TESTING=ON) onmain31088e9.ImportModuleTests.cpp(NeededLibraryNameoflibSceSsl2.prxandlibSceSsl2.sprx;ImportModulewithlibSceSsl2.prxalone and next tolibSceSsl.prx),test_linux_named_imports.py(the converted image needslibSceSsl.prx),test_windows_import_modules.py(thelibSceGnmDriver_padebugcase also runs forlibSceSsl2.prxandlibSceSsl2.sprx) andtools/tests/test_import_audit.py(--strict-providersfindslibSceSsl.prxfor alibSceSsl2dependency, from a PE and from an ELF provider). Withmain'sImportModule.hppandimport_audit.pythese four tests (import_module,windows_import_modules,linux_named_imports,import_audit) fail. With the change they pass.ctest -j 8: 1,135 of 1,142 pass. The 5select_tests(select_testsand fourselect_tests_*classes) fail on this machine withFileExistsErrorwhiletools/tests/test_select_tests.pymakes its temporary link folder, as they did without this change.test_registrationandconfigure_seed_round_tripsreached the 120 s limit in the parallel run and pass when run alone (23 s and 17 s).tools/import_audit.pyon the import registries of CUSA24767 01.71eboot.binand its modules (my own dump), against libraries built frommainef7dc44 with local changes that do not touchlibSceSsl: withmain's audit 13 imports are absent (all fromlibSceSsl.prx, under the needed librarylibSceSsl2.prx); with this branch none.mainand with this branch: all 24 outputs are byte-identical (gpu_readerstops the same way with both, on a syscall in its own code).tools/check_conventions.py --base origin/mainpasses.tools/import_audit.py(25281 alsotools/tests/test_import_audit.py); a three-way merge of those files with this branch is clean. Open PRs 13486 and 13472 changeImportModule.hpp(13472 alsoImportModuleTests.cpp) and already have one conflict withmainin each of those files; with this branch they have the same number of conflicts, which then also hold the newlibSceSsllines.tools/pr_overlap.pywas not run, asghis not signed in on this machine.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)