refactor(ajm): drop duplicated stub exports from libSceAjm and libSceAjmi #228
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/228"
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 adriadam10 on 2026-10-01T17:21:45Z.
What
libSceAjmandlibSceAjmionly exportedNotImplementedstubs of 13 functions thatlibSceAjm.nativealready implements (Export.cppandsrc/Ajm.cpp). As suggested in review, bothExport.cppnow contain onlyAPS5_DUMMY_FUN, likelibkernel_sys, so there are no duplicate exports between the libraries and titles bind to the implementation inlibSceAjm.native.No title found that loads
libSceAjmwithoutlibSceAjm.native.Tested
Linux (CachyOS, GCC): Release build,
ninja libs(NID patching OK) and fullctestpass.nm -DonlibSceAjm.prxandlibSceAjmi.prxshows onlyDummyFunction_nid_no_patch. Windows only through CI. No title tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-01T17:22:07Z.
Progress report (
c00bc19→14e1321)📈 System libraries: 78.87% (+0.68%, -26 removed functions)
🗑️ 26 removed
sceAjmBatchCancelsceAjmBatchErrorDumpsceAjmBatchWaitsceAjmDecAt9ParseConfigDatasceAjmFinalizesceAjmInitializesceAjmInstanceCreatesceAjmInstanceDestroysceAjmMemoryRegistersceAjmMemoryUnregistersceAjmModuleRegistersceAjmModuleUnregistersceAjmStrErrorsceAjmBatchCancelsceAjmBatchErrorDumpsceAjmBatchWaitsceAjmDecAt9ParseConfigDatasceAjmFinalizesceAjmInitializesceAjmInstanceCreatesceAjmInstanceDestroysceAjmMemoryRegistersceAjmMemoryUnregistersceAjmModuleRegistersceAjmModuleUnregistersceAjmStrErrorImported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-10-01T18:55:29Z.
Have you discovered that this is necessary for running any game? I'm just assuming that if a game imports libSceAjm, it also imports libSceAjm.native, and then the symbol will be found; you shouldn't add a copy of it to another library. In the case of Font, a game was indeed found that only loads one of them.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-01T19:17:03Z.
No, I haven't found a title that loads only libSceAjm; it came from the progress map. One thing I noticed: libSceAjm.prx and libSceAjmi.prx still export the same 13 symbols as NotImplemented stubs, and the relinked output has no symbol versioning, so on Linux a title listing libSceAjm before libSceAjm.native in DT_NEEDED would bind to the stub. If that matters, removing the duplicated stubs (instead of copying the implementation) would avoid it. Otherwise I'll close this one.
Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-10-02T07:11:51Z.
If a library exports as stubs only functions that are already implemented in another library, then follow the example of libkernel_sys:
Then we won't have duplicate exports between libraries.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-02T07:17:26Z.
Done: both
Export.cppare nowAPS5_DUMMY_FUNonly, likelibkernel_sys; the shared cmake and the test are gone.