Repository navigation
feat(libSceShare.native): add the four exports the plain library has - #1024
Dextroid17 wants to merge 1 commit into
Conversation
Progress report (ee391a5 → a84acf0)📉 System libraries: 86.53% (-0.09%, +1 implemented, +3 declared functions) ✅ 1 implemented
🆕 3 declared as stubs
|
libSceShare.native exported thirteen of the seventeen symbols libSceShare exports, so a title importing one of the four stopped at load with an undefined symbol while the plain library answers it: - sceShareCaptureScreenshotExtended - zeroes the request id and answers ERROR_NOT_SUPPORTED - sceShareCaptureVideoClipExtended, sceShareGetRunningStatus and sceShareSetContentParamForApplicationTitle - unimplemented paths, declared under their names as libSceShare declares them Measured from a Release build of libs (nm -D --defined-only): the wrapper goes from four symbols missing to none. The same measurement over the other eight .native wrappers shows they already cover their plain libraries completely - five of them exactly, and the three remaining differences are a std::ctype instantiation and the DummyFunction_nid_no_patch placeholder of two libraries that have one real export each. No dependency edge or lookup scope change is needed for any of them. The declarations are appended rather than placed alphabetically: an open pull request edits this file a few lines above where sceShareGetRunningStatus would go. Add the guest_share_extended test: the answer the extended screenshot call gives, the request id it leaves behind for both null and non-null parameters, and the throwing paths.
d94f281 to
a84acf0
Compare
|
The first Windows run failed in The test's No change to the library or the exports. Linux was already green; the suite is 371/371 locally. |
|
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 What is fixed here is reachability, which fails differently. A title's Share plugin that links 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,
If 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. |
|
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 A load that can't start does leave a log line: the loader prints |
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 feat(libSceShare.native): implement sceShareGetCurrentStatus #967 lands first, this is a trivial rebase. feat(libSceShare.native): implement sceShareGetCurrentStatus #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 Linux: .native wrapper libraries have no dependency edge to their plain twin, so guest modules cannot bind #906.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch).mdfiles or images added to the repositoryAI-assisted: yes.