Commit Graph
11 Commits
Author SHA1 Message Date
Itamar Medyoni ce1ee687d8 feat(libScePosixForWebKit): forward __wrap_fchown, link, readlink, statvfs and symlink
WebKit links these calls through GNU ld --wrap, so each export takes the
signature of the function it is named after and calls the libkernel_sys
or libSceLibcInternal implementation; the module now links both.
2026-10-26 11:04:20 +01:00
Dean Galvin 7ea2e7b914 Merge main into feat/webkit-pthread-setname 2026-10-25 12:56:13 +13:00
Dean be686ec858 Merge pull request #9642 from Noxy-HNR/fix/guest-byte-case-locale
fix(libc): isolate byte case comparisons from the host locale
2026-10-24 02:02:44 +13:00
Braxton Atkinson 07bec523ad docs(libc): separate byte-case compatibility note 2026-10-22 15:00:23 -05:00
Braxton Atkinson 9b40e1e9b6 fix(libs): keep byte case comparisons in the guest C locale 2026-10-22 14:10:45 -05:00
zaryabzip b9e5dc160f feat(libScePosixForWebKit): forward the --wrap exports with implemented targets
__wrap_access, __wrap_getcwd and __wrap_getenv forward to libc;
__wrap_clock_gettime, __wrap_lstat and __wrap_mmap forward to libkernel.
2026-10-22 13:03:12 +05:00
Nixitov 5aa33fe271 feat(libScePosixForWebKit): export pthread_setname_np
AI-assisted: yes
2026-10-21 18:04:13 +02:00
juanpimg 63af1bfcf8 fix(libScePosixForWebKit): export the host-named functions through a renamed helper
gethostbyname_r and sysinfo are names of host C library functions. Defining
them in libScePosixForWebKit made the library's own call to
::gethostbyname_r in Resolver.cpp bind to the new declaration, and the
guest_resolver test failed with "gethostbyname_r not implemented". Export
the two NIDs through a helper with the library's own prefix, the way
libSceAmpr re-exports the libc functions.
2026-10-20 23:22:18 +02:00
juanpimg 1f1add461e feat(prx): declare the missing PS5 3.20 system exports in the next tier of libraries
AnyPS5 resolves a title's imports by NID, so a title that imports a system
function that no AnyPS5 library provides fails to load with an unresolved
import. This declares 222 such exports across 11 PS5 system libraries that
AnyPS5 implements but does not provide.

Each declaration calls NotImplemented_nid_no_patch and returns 0; none of
them implements the function. A declaration with a credible prototype uses
it and cites the source with a pinned commit; the rest are declared without
parameters, which resolves the import without making an ABI claim. The
technical-debt files record the limitation per library.

The list is the intersection of the export table of the console's library
(function symbols only), the pinned aerolib names and the functions not yet
defined anywhere in the repo. Every name recomputes to its NID with
tools/nid_names.py.

libSceAudio3d and libSceVoice are left out because #8331 declares them.
2026-10-20 23:22:17 +02:00
screammandClaude Fable 5.1 15bbc19501 feat(libScePosixForWebKit): implement getservbyname
Implement getservbyname (H1bArJPagV0) in libScePosixForWebKit. Cloud
Play (PPSA99600) imports it from this library only (registry index 408,
call site 0x1042124); once fnmatch (#3545) is in, its predicted load
stop is:

    FAIL: unresolved ELF import H1bArJPagV0 from libScePosixForWebKit.prx

The ps5-payload-dev SDK stubs (f5d40f02, sce_stubs/) declare
getservbyname in libScePosixForWebKit.c and not in libkernel.c or
libSceLibcInternal.c. The call site is the service-name branch of a
getaddrinfo inside the title: a non-numeric service is looked up with
protocol "tcp", "udp" or "sctp" and the port is read big-endian at
offset 16 of the result, which fixes the servent layout used here
(name, aliases, 32-bit port, protocol at 0, 8, 16, 24).

The guest has no /etc/services and the console's file is unknown, so the
function searches 37 lines of FreeBSD 11.4 etc/services (8c639945):
ftp-data, ftp, ssh, telnet, smtp, domain, tftp, http, pop3, ntp, imap,
https, rtsp, submission, imaps and pop3s with their aliases and
protocols, in file order. None of their names or aliases appears on an
earlier line of the full file, so these lookups answer as the full file
would. The search follows files_servent in lib/libc/net/getservent.c
(8c639945): exact, case-sensitive match on the name or an alias, a null
protocol takes the first match, the port in network byte order, the
result in per-thread storage like getserv's NSS TLS state. Any other
name returns null without touching errno, as for a name the file lacks.
The repository's getaddrinfo still resolves service names through the
host, so there was no table to share; this is recorded in
TechnicalDebt.md.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-13 15:43:05 +03:00
Adrià FranchandClaude 342a8c4590 docs(debt): move library entries to one file per library
Co-Authored-By: Claude <[email protected]>
2026-10-12 20:38:29 +02:00