Repository navigation
fix(libkernel): export _readv, _writev, _fcntl, _fstat, __sys_socketex - #5992
Conversation
OpenOrbis programs and modules import these PS4 libkernel names (the graphics, library and networking samples). The underscore names forward to readv, writev, fcntl and fstat, as _ioctl already does; _fcntl passes its argument on as a full 64-bit value, so the record lock commands keep their whole pointer. __sys_socketex creates a socket like socket(); its name argument is ignored, as sceNetSocket does.
|
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.
|
|
I checked the overlap the bot lists. I fetched each listed pull request and, for every file it shares with this one, merged its change with The bot lists 21 pull requests, with 41 shared files between them ( AI-assisted: yes (Claude Code). I ran these checks myself on Windows 11. 🤖 Generated with Claude Code |
|
Checked the five forwarders against |
|
Re-checked against current |
What
PS4 programs and modules built with the OpenOrbis toolchain import these libkernel names, and the samples stop at start-up without them:
FAIL: unresolved ELF import YSHRBRLn2pI(_writev, all nine samples that otherwise start),+WRlkKjZvag(_readv),t0fXUzq61Z4(_fcntl) andA0O5kF5x4LQ(_fstat, in the library sample'slibExample.prx).__sys_socketexis imported by the networking sample._readv,_writev,_fcntland_fstatforward toreadv,writev,fcntlandfstat, as_ioctlalready does._fcntlpasses its argument on as a full 64-bit value, so the record lock commands keep their whole pointer.__sys_socketexcreates a socket likesocket(); its name argument is ignored, assceNetSocketdoes.Part of the PS4 homebrew work tracked in #3093.
Tested
Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, full build with
BUILD_TESTING=ON, onmaine442f4c2e:guest_kernel_fcntl,guest_file_vectorandguest_file_timestampspass, as doguest_udp,guest_sendfileandguest_sce_net(6/6). They call each name and check what it did:_readvreads from an offset,_writevwrites swapped segments,_fstatreturns the same times asfstat,_fcntlsets descriptor flags and reads a record lock into a staticflock(in the image, above 4 GiB), and__sys_socketexmakes a TCP socket._fcntlnarrowing its argument toint, or dropping it;__sys_socketexswapping family and type;_readvreading nothing;_writevclaiming success without writing;_fstatfilling nothing.main84b01f9cd, all together one442f4c2e): with this change the nine samples start; the networking sample, a TCP server, was not run for this PR.tools/check_conventions.py --base origin/mainpasses.Not tested on Linux.
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)🤖 Generated with Claude Code