feat(libSceShare.native): add the four exports the plain library has #1024
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1024"
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 Dextroid17 on 2026-10-07T01:17:10Z.
Which title needs this
PPSA12544. Its Share plugin imports
sceShareCaptureVideoClipExtendedfrom this library, which is the provenance the closed #989 records for the declaration. A plugin that linkslibSceShare.nativeand imports a symbol the wrapper does not export cannot load at all — it stops withundefined symbolbefore any call is made — so the evidence needed here is that a title imports it, which is what PPSA12544 does, rather than that a title calls it.The same shape as #992, merged: declaring exports a named title imports and no library provides.
What this does
libSceShare.nativeexported 13 of the 17 symbolslibSceShareexports, so a title importing one of the four stopped at load with an undefined symbol even though the plain library answers it. The wrapper now exports all 17.libSceShareimplements it)sceShareCaptureScreenshotExtendedERROR_NOT_SUPPORTEDsceShareCaptureVideoClipExtendedNotImplemented_nid_no_patchsceShareGetRunningStatusNotImplemented_nid_no_patchsceShareSetContentParamForApplicationTitleNotImplemented_nid_no_patchWhy this shape and not a dependency edge
Context is #906. The plan there was to give each
.nativewrapper aDT_NEEDEDedge to its plain twin, which fails: the wrappers are in the executable'sDT_NEEDED, the pairs share NIDs, so the twins enter the global scope and modules rebind to the wrong implementation (that was #1009, closed).Measuring the pairs first (
nm -D --defined-onlyover a Release build oflibs) shows most of that work is unnecessary:_ZNKSt5ctypeIcE8do_widenEcDummyFunction_nid_no_patchDummyFunction_nid_no_patchEight of the nine wrappers already cover their plain library; the three remaining differences are not NIDs at all (a
std::ctypeinstantiation and theDummyFunction_nid_no_patchplaceholder of two libraries with one real export each).libSceShare.nativewas the only genuine gap, and closing it needs no edge, no second copy of anything in the global scope, and nothing for the pairs to rebind against.Verification
guest_share_extended_testspasses.mainplus the new test).static-free change: nothing existing is modified in behaviour, only four exports are added.Notes for review
sceShareGetRunningStatuswould sit. If #967 lands first, this is a trivial rebase. #967 implementssceShareGetCurrentStatus, a different function, so there is no overlap in what is added.libSceSharedeclares them exactly this way.undefined symbol: wTpfglkmv34is defined in bothlibSceMsgDialog.prxandlibSceMsgDialog.native.prx, so that symptom has a different cause, which I asked about on #906.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch).mdfiles or images added to the repositoryAI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T01:17:32Z.
Progress report (
ee391a5→a84acf0)📉 System libraries: 86.53% (-0.09%, +1 implemented, +3 declared functions)
✅ 1 implemented
sceShareCaptureScreenshotExtended🆕 3 declared as stubs
sceShareCaptureVideoClipExtendedsceShareGetRunningStatussceShareSetContentParamForApplicationTitleImported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T01:30:37Z.
The first Windows run failed in
cmake --build build:The test's
try/catchneeds the C++ runtime, and the test linked onlylibSceShare.native, which is a plain C-style export library, so nothing pulledlibstdc++in. Every other test in this tree that catches an exception linkslibcas well for exactly that reason (guest_ajm_tests,guest_aio_tests,guest_buffer_reuse_tests,guest_jpeg_enc_tests,ngs2_geom_tests), so this now does too, and the link pullslibstdc++.so.6.No change to the library or the exports. Linux was already green; the suite is 371/371 locally.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T01:42:42Z.
Worth stating up front, because #989 (now closed) implemented one of these four in the plain library and this PR touches the same function.
That closure was right for its own case: nothing on
mainstops atsceShareCaptureVideoClipExtended, so implementing its behaviour had no evidence behind it. This PR does not change that function's behaviour. All three unimplemented ones are declared asNotImplemented_nid_no_patch, exactly aslibSceSharealready declares them, andsceShareCaptureScreenshotExtendedis copied value for value from the plain library, which #989's review already called consistent.What is fixed here is reachability, which fails differently. A title's Share plugin that links
libSceShare.nativeand importssceShareCaptureVideoClipExtendedcannot load at all while the wrapper does not export it — it stops withundefined symbolbefore any call happens. So the evidence this needs is that a title imports it, not that a title calls it, and that is exactly the provenance #989 records: PPSA12544's Share plugin importssceShareCaptureVideoClipExtended.That is the same shape as #992, merged today — declaring exports a named title imports that no library provides.
For completeness on the other three,
libSceSharedeclares them all, and the wrapper is the library a title actually links:libSceSharelibSceShare.nativesceShareCaptureScreenshotExtendedERROR_NOT_SUPPORTED)sceShareCaptureVideoClipExtendedNotImplemented_nid_no_patchsceShareGetRunningStatusNotImplemented_nid_no_patchsceShareSetContentParamForApplicationTitleNotImplemented_nid_no_patchIf the direction you prefer is to leave the wrapper short until a title log shows the load failing, say so and I will close this — but the failure mode here is a load that cannot start, so a log line would be the absence of one.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-07T02:04:56Z.
Thanks for laying that out; the distinction between calling and importing is fair, and #992 was the same shape.
The difference is that on #992 no library provided those exports, while here
libSceSharealready does. On #228 the owner's point was that a title importinglibSceAjmalso loadslibSceAjm.native, so a copy in the twin isn't needed. If that's true for Share too, PPSA12544's plugin resolves these four from the plain library and loads fine on main.A load that can't start does leave a log line: the loader prints
undefined symbol: <name>(or theNotImplemented-style stop) with the module that asked for it. If you can run PPSA12544 on main and it stops there, please post that line and I'll reopen this straight away; it would also tell us whether the fix belongs in the twin or in how the plain library is found. Until then I'm closing it, since the evidence so far is the import list.Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T11:20:06Z.
@jeffrey12cali, who filed #906 and runs the title that hit it, has asked for this to land — after this was closed, in a comment on that issue:
He also explains the discrepancy we were both measuring, and it is a snapshot difference rather than either of us being wrong: he is pinned to
sos-v0.2.2(c8830699), wherelibSceMsgDialog.nativeexported 5 symbols withwTpfglkmv34absent — that is theundefined symbolwhich opened #906 — while onmainthe wrapper declares it. So an edge genuinely is not needed for that pair, and the only pair still short is this one.His side is a temporary stopgap, and he says it comes out on its own:
tools/sos_linux/twinscope.pyreplaces the importing module'sDT_NEEDEDname with the plain twin's, purely because they are pinned to that release — "when we re-pin ontomainit comes out: the wrapper already answers the import, and your PR closes the last pair."So this is not the PPSA12544 log line you asked for, and I am not claiming it is. It is the title-side author saying he wants this rather than the scoping change, which is the question the close turned on.
If that is enough, say so and I will reopen, rebase and re-run; if you would rather still wait for the plugin's own
undefined symbolline, I will leave it closed and say as much on #906 so the thread does not wait on me.Pull request closed