Commit Graph
88 Commits
Author SHA1 Message Date
Dean Galvin d38514c546 Merge branch 'main' into salvage/libc-internal-9498 2026-10-30 08:17:22 +13:00
Dean b23f3e59b0 Merge pull request #11748 from oneandonlydean/salvage/libc-internal-9665
feat(libSceLibcInternal): declare 149 PS5 3.20 round six exports
2026-10-30 08:12:50 +13:00
Adrià 7b57271358 Merge pull request #11504 from verusferro/feat/libc-xfilesystem-error
feat(libc): throw std::filesystem::filesystem_error from _Xfilesystem_error as the console's libc does
2026-10-29 13:47:45 +01:00
p3nicillinandClaude Opus 5.5 651436d6a3 feat(libSceLibcInternal): add __opendir2
The ps5-payload-sdk's fts_build calls __opendir2 with DTF_HIDEW,
DTF_NODUP and DTF_REWIND, and PS5 Bible Reader (PPSA99793) failed to
load on the unresolved import. In FreeBSD 11 those flags only change
reading a union mount, which AnyPS5 does not have, so the call opens
the directory as opendir does; other flags throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 15:26:34 +00:00
verusferro 778c4a74ec feat(libc): throw std::filesystem::filesystem_error from _Xfilesystem_error as the console's libc does 2026-10-28 15:10:30 +03:00
Santhosh Kumar d3d7ae0ae2 fix(libSceLibcInternal): preserve combined POSIX spawn flags 2026-10-27 14:48:12 +05:30
Santhosh Kumar e8db1c1648 test(libSceLibcInternal): observe combined spawn flags in a dedicated fixture 2026-10-27 14:45:53 +05:30
Dean Galvin 428d3c1ff3 fix(libSceLibcInternal): drop the stubs open PRs implement
Remove the 8 stubs whose NIDs open PRs #10615, #10780 and #11729 add to libc, with their debt names, leaving 120.
2026-10-27 20:32:46 +13:00
Dean Galvin 9230c18a7b fix(libSceLibcInternal): drop the stubs open libc PRs now implement
Remove _Btowc (aMucxariNg8) and _Getptimes (8xXiEPby8h8), which #11734 and #11735 add to libc, with their debt names.
2026-10-27 20:07:11 +13:00
Dean Galvin ece7d48331 fix(libSceLibcInternal): drop the exports main already provides
Remove the stubs whose NIDs main now defines, with their debt entries, and
keep main's own debt entries unchanged: the imports are appended after them.
2026-10-27 19:14:02 +13:00
Dean Galvin 25ba5a90e2 merge: main into salvage/libc-internal-9498 2026-10-27 19:11:14 +13:00
Dean Galvin a957c2621e fix(libSceLibcInternal): close the add_library call and add the round six stubs with target_sources
The source list edit dropped the closing parenthesis, so the next line
became part of the call.
2026-10-27 19:10:55 +13:00
Dean Galvin d482235d29 fix(libSceLibcInternal): drop the export main already provides
Remove the one round six stub whose NID main now defines, with its debt
entry, and keep main's own debt entries unchanged: the round six section
is appended after them.
2026-10-27 19:10:35 +13:00
Dean Galvin c247437c9c merge: main into salvage/libc-internal-9665 2026-10-27 19:05:25 +13:00
Adrià FranchandClaude Sonnet 5.5 654eadd7f5 merge: sync archive directories with main
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-26 10:50:37 +01:00
qpavyros 6105be4431 merge: sync archive directories with main 2026-10-26 01:10:12 +02:00
MarcZX10 d824ec2264 test(libSceLibcInternal): let the spawn test's child die from SIGBUS in an ASan build 2026-10-25 22:19:02 +00:00
fogydes 19a3d60aed fix(libSceLibcInternal): declare _NSGetExecutablePath on Apple hosts 2026-10-25 13:57:18 +01:00
fogydes 723d932f73 feat(libSceLibcInternal): implement posix_spawn process creation and reaping 2026-10-25 13:57:17 +01:00
xdCloudy 8b6fdd893d fix(libc): register pending exports by NID 2026-10-24 16:35:07 -07:00
xdCloudy 196bbeef01 feat(libSceLibcInternal): declare 150 PS5 pending exports 2026-10-24 16:35:07 -07:00
xdCloudy d3c6cbda00 fix(libSceLibcInternal): name libc ABI alias accurately 2026-10-25 00:30:49 +01:00
xdCloudy edb43f0b59 fix(libSceLibcInternal): register round six NIDs 2026-10-25 00:21:17 +01:00
xdCloudy 76b115b8b9 docs(libSceLibcInternal): isolate pending export section 2026-10-25 00:15:30 +01:00
xdCloudy 8bd388fdbf feat(libSceLibcInternal): declare 150 PS5 3.20 exports 2026-10-25 00:13:42 +01:00
boykopovar fdf9ca7574 fix(sdk): reconcile public headers after rebase 2026-10-24 23:17:47 +03:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
qpavyros 0a64d23bdf feat(libkernel): enumerate archived app directories
Squashed onto current main, resolving the fchflags/fstatfs conflict with the kqueue guards.
2026-10-24 20:18:05 +02:00
Adrià a0aaf24b68 Merge pull request #8996 from hypermoist/feat/libc-init-once-clr
feat(libSceLibcInternal): add the __std_init_once _clr calls
2026-10-24 18:14:49 +02:00
Adrià 5d251e6b0e Merge pull request #8994 from hypermoist/feat/libc-filesystem-primitives
feat(libSceLibcInternal): add the std::filesystem file and directory primitives
2026-10-24 14:39:57 +02:00
orezraeyandClaude Opus 5.5 3717573887 fix(libkernel): answer sceKernelGetModuleInfoFromAddr's flags and failures as measured on a PS5
Flags 1 finds any module and flags 2 only non-system ones; other flags return EINVAL instead of throwing, every failure clears the 0x1A8 bytes, and st_size is left 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 11:49:24 -03:00
Dean 4997726a5f Merge pull request #8703 from nikowolf123/feat/libcinternal-double-underscore-inet
feat(libSceLibcInternal): export __inet_ntoa_r
2026-10-24 03:29:12 +13:00
Dean efc6cd8f1b Merge pull request #8702 from nikowolf123/feat/libcinternal-underscore-err-warn-progname
feat(libSceLibcInternal): export _err, _warn and _getprogname
2026-10-24 03:25:55 +13:00
Kang, Harry Zixuan 726edc503b feat(windows): support MSYS2 GCC runtime builds 2026-10-21 20:29:55 -07:00
NikoandClaude Opus 5.5 c8ad92f878 feat(libSceLibcInternal): export _err, _warn and _getprogname
The PS5 3.20 export inventory lists _err, _warn and _getprogname in
libSceLibcInternal next to err, warn and getprogname, with the NIDs
UhKI6z9WWuo, XQFE8Y58WZM and iI6kGxgXzcU. In FreeBSD 11.4 libc the
underscore names are the definitions and the public names are weak
references to them (lib/libc/gen/err.c, lib/libc/gen/getprogname.c),
and libthr interposes none of them, so each pair is one function.

_err and _warn now hand their arguments to verr and vwarn, which use
errno at the call as err and warn do; _getprogname returns
getprogname(). The debt file records that the console's module was not
read.

guest_err checks the _warn and _err text for errno 13 with a formatted
message, that _err passes its status to the err_set_exit hook, and that
_warn without a format returns without calling the hook.
guest_program_name checks that _getprogname returns the current
__progname pointer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 17:02:54 +02:00
NikoandClaude Opus 5.5 3e1b0f5aa4 feat(libSceLibcInternal): export __inet_ntoa_r
The PS5 3.20 export inventory of libSceLibcInternal lists
__inet_ntoa_r next to inet_ntoa_r, and no AnyPS5 library exported it,
so a title importing it could not resolve it. It now runs inet_ntoa_r:
FreeBSD 11.4's arpa/inet.h names the function __inet_ntoa_r, and
inet_ntoa.c makes inet_ntoa_r a weak alias of it.

__inet_addr, __inet_aton and __inet_ntoa are in the same inventory,
but libc already exports them and the relinker also looks up
libSceLibcInternal imports in libc, so they are not added here.

guest_inet_address formats an address through __inet_ntoa_r into a
buffer of exactly the text's size, and checks that a buffer one byte
short is returned unchanged with ENOSPC and that inet_ntoa's buffer is
left alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:25:51 +02:00
hypermistandClaude Opus 5.5 b3b6e83aca feat(libSceLibcInternal): add the __std_init_once _clr calls
__std_init_once_begin_initialize_clr, __std_init_once_complete_clr and
__std_init_once_link_alternate_names_and_abort were not exported. As in
the PS5 12.00 module, begin moves an idle once object to running and
reports pending, reports done without pending, and waits on the object
while another caller runs; complete marks it done, or idle again for
flag 4, wakes every waiter and returns 1; the third aborts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 22:02:40 +13:00
hypermistandClaude Opus 5.5 e66eae3c5a feat(libSceLibcInternal): add the std::filesystem file and directory primitives
The Dinkumware std::filesystem in titles calls twelve low-level helpers
that libSceLibcInternal exports and this project did not: _Stat, _Lstat,
_File_size, _Last_write_time, _Make_dir, _Remove_dir, _Unlink, _Chmod,
_Current_get, _Open_dir, _Read_dir and _Close_dir. They now follow the
PS5 12.00 module on top of the guest stat, mkdir, rmdir, unlink, chmod,
getcwd and directory calls, with its results: file_type codes from the
mode, not_found for ENOENT, ENOTDIR, EINVAL and ENAMETOOLONG, mkdir's
1/0/-errno, -1 for a failed size, and directory reads that skip the dot
entries and report the type as unknown. As on the console, _Lstat
follows links like _Stat.

The two _Xfilesystem_error overloads are exported and still throw, as
the guest filesystem_error type is not provided yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 21:58:09 +13:00
Dean ecd45318d9 Merge pull request #8208 from al3w0f205/fix/statvfs-null-output-order
fix(libSceLibcInternal): check null output before path in statvfs
2026-10-20 18:31:31 +13:00
al3w0f205 a8c5a3afc8 fix(libSceLibcInternal): check null output before path in statvfs 2026-10-19 22:14:06 -05:00
xXPBSXxandClaude Sonnet 5.5 7535eb45fc fix(libSceLibcInternal): start fdopendir at the descriptor position and set FD_CLOEXEC
fdopendir listed the directory from its first entry whatever position the
descriptor had, and left FD_CLOEXEC unchanged. FreeBSD 11.4 fdopendir sets
FD_CLOEXEC on the descriptor and preserves the initial seek position (lib/libc/gen/opendir.c).
The Windows directory handle now skips the entries the descriptor already
consumed, the Linux handle duplicates the descriptor, and the test requires both.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 03:11:14 +02:00
Adrià 3fdd1f52e9 Merge pull request #6668 from DavidSamir/fix/libc-statvfs-path-macos
fix(libSceLibcInternal): read statvfs by path on macOS
2026-10-19 10:19:46 +02:00
Adrià 9cc0f16f6e Merge pull request #6533 from ArjenS-LA/feat/guest-getopt-long-only
feat(libc): implement getopt_long_only
2026-10-19 06:04:23 +02:00
Adrià 6e27fc8f07 Merge pull request #6233 from milescoviello/fix/spawn-missing-program
fix(libSceLibcInternal): fail posix_spawn with ENOENT when the program is not there
2026-10-18 22:37:14 +02:00
Dean cb1d6e5bd6 Merge pull request #7123 from thuanquang/fix/guest-frame-chain-zero-record
fix(libkernel): end guest thread, fiber and context frame chains at a zero record
2026-10-18 22:04:31 +13:00
T3cm0andClaude Opus 5.5 53a1fe47d6 feat(libSceLibcInternal): implement err, warn, psignal and sys_signame
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 03:02:13 -05:00
Dean 1d8524be7c Merge pull request #7352 from T3cm0/bionic/inet-aton-ntoa
feat(libSceLibcInternal): implement inet_aton, inet_addr and inet_ntoa
2026-10-18 15:52:20 +13:00
T3cm0andClaude Opus 5.5 300b7ff34c feat(libSceLibcInternal): implement inet_aton, inet_addr and inet_ntoa
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:42:20 -05:00
T3cm0andClaude Opus 5.5 f9b7b230fc feat(libSceLibcInternal): implement the remaining posix_spawnattr accessors
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:41:26 -05:00
milescovielloandClaude Opus 5.5 a7c68a3919 fix(libSceLibcInternal): fail posix_spawn with ENOENT when the program is not there
Dusklight (PPSA99305) aborts on main as soon as its Select disc image
item is chosen: SDL's file dialog probes "zenity --version" through
posix_spawnp, and posix_spawnp throws "process creation not implemented".

FreeBSD 11.4's posix_spawn returns the error of the child's exec, and
an exec of a program that is in no directory of PATH (_PATH_DEFPATH
when PATH is unset) fails with ENOENT. Both calls now return ENOENT
without writing the process ID when the program is not in the guest
file system, and keep throwing when it is. SDL then reports the file
dialog as unsupported and the title stays on its menu.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 18:31:37 +00:00