Commit Graph
100 Commits
Author SHA1 Message Date
Kyon 6eb80871af fix(libSceLibcInternal): prevent host symbol interposition 2026-10-30 12:32:42 +00:00
Kyon 967b1c74bf Merge remote-tracking branch 'origin/main' into feat/libc-internal-320-exports 2026-10-30 12:30:57 +00:00
Dean 99f7b51d2b Merge pull request #12541 from oneandonlydean/licence-notices-ported-code
docs(libc): add upstream licence notices to ported math and siglist code
2026-10-31 00:50:17 +13:00
Adrià 3d19f3fed3 Merge pull request #13082 from Celegans12/feat/libcinternal-inventory-exports-20261030
feat(libcinternal): add missing heap inventory exports
2026-10-30 11:38:43 +01:00
Adrià d6cf4d47ae Merge pull request #12977 from KernelPanicNT/feat/libcinternal-opendir2-flags
feat(libSceLibcInternal): handle every __opendir2 flag
2026-10-30 06:21:24 +01:00
Kyon 0173ef982e refactor(libSceLibcInternal): avoid build file conflict 2026-10-30 02:39:09 +00:00
Kyon 36ea3f125f refactor(libSceLibcInternal): exclude overlapping exports 2026-10-30 02:39:01 +00:00
Kyon 97d3ac5217 Merge remote-tracking branch 'origin/main' into feat/libc-internal-320-exports
# Conflicts:
#	docs/dev/debt/libSceLibcInternal.md
2026-10-30 02:37:07 +00:00
Codex 0c9bfa36e2 feat(libcinternal): add missing heap inventory exports 2026-10-30 02:20:40 +02:00
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
Kyon d2ec748f20 feat(libSceLibcInternal): declare 308 callable exports 2026-10-29 18:22:22 +00:00
KernelPanicNT 03fc7bbca3 feat(libSceLibcInternal): handle every __opendir2 flag
Follow FreeBSD 11.4's __opendir2: __DTF_READALL or __DTF_SKIPREAD
returns NULL with errno unchanged, and every other value opens the
directory as opendir does, since the remaining flags only act on union
mounts and whiteout entries.
2026-10-29 17:28:13 +00: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
Dean Galvin bb4132a403 docs(libc): add upstream licence notices to ported math and siglist code
Add the original FreeBSD/msun copyright and licence text, with the upstream file and revision, at the top of Math.cpp and SignalList.cpp. Header comments only; no code change.
2026-10-29 07:45:51 +13: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