feat(libc): export the remaining std::__sce_v2 facet ids and ios_base _Sync and _Index #15923

Merged
Danigamer05 merged 1 commit from upstream-pr/15923 into main 2026-11-11 22:11:14 +00:00
Danigamer05 commented 2026-11-05 00:27:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Danigamer05 on 2026-11-05T00:27:48Z.


What

Export the remaining std::__sce_v2 facet ids and the versioned ios_base::_Sync and ios_base::_Index from libc.

Export NID Original address
_ZNSt8__sce_v28ios_base5_SyncE a05EUj+p6LA 0x1939E4
_ZNSt8__sce_v25ctypeItE2idE -WAEp-LsQK8 0x197928
_ZNSt8__sce_v27codecvtItc9_MbstatetE2idE vKLkrWOC908 0x197930
_ZNSt8__sce_v27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE CvgG53ICQZ8 0x198020
_ZNSt8__sce_v27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE 00lxRufmIV8 0x198028
_ZNSt8__sce_v27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE XUnjw9qmjZk 0x198038
_ZNSt8__sce_v28numpunctIwE2idE 69nx-zgXr0o 0x198048
_ZNSt8__sce_v27codecvtIcc9_MbstatetE2idE ef0jk36lGzM 0x198050
_ZNSt8__sce_v27collateIcE2idE UhVg8P8OCOQ 0x198058
_ZNSt8__sce_v27collateIwE2idE fjxxWfxa3g8 0x198060
_ZNSt8__sce_v28messagesIcE2idE xLZL2qvPy5M 0x198068
_ZNSt8__sce_v28messagesIwE2idE HdKMR94lfAM 0x198070
_ZNSt8__sce_v210moneypunctIcLb0EE2idE yIcTxIYUO+k 0x198078
_ZNSt8__sce_v210moneypunctIcLb1EE2idE fGdtCU3pAWA 0x198080
_ZNSt8__sce_v210moneypunctIwLb0EE2idE fazFp6JG9Uo 0x198088
_ZNSt8__sce_v210moneypunctIwLb1EE2idE sn-Jk8s1+9A 0x198090
_ZNSt8__sce_v29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE 21EZf6FejHE 0x198098
_ZNSt8__sce_v29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE K2giEFoly0M 0x1980A0
_ZNSt8__sce_v29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE Ixyr-5QNxDA 0x1980A8
_ZNSt8__sce_v29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE NlLpvZiX8fE 0x1980B0
_ZNSt8__sce_v28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE X98EAGBf678 0x1980B8
_ZNSt8__sce_v28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE MYYj-E+1gAs 0x1980C0
_ZNSt8__sce_v28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE dBdmM6nkpn0 0x1980C8
_ZNSt8__sce_v28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE -AmVeGEwTx0 0x1980D0
_ZNSt8__sce_v28ios_base6_IndexE bWxIM09FkrI 0x198508
_ZNSt8__sce_v27codecvtIDsDu9_MbstatetE2idE qhaUpV8-EbQ 0x198E58
_ZNSt8__sce_v27codecvtIDiDu9_MbstatetE2idE yqJXbXHoCoQ 0x198E60
_ZNSt8__sce_v27codecvtIDsc9_MbstatetE2idE pKpcusqjEpA 0x198E68
_ZNSt8__sce_v27codecvtIDic9_MbstatetE2idE DnSrcExa0xU 0x198E70

The behavior comes from the libc.prx bundled with PPSA03671 v01.001.005 (J03848509, SHA-256 483961e086b8a1fffa8138b3c0badf798987fb5f35ec908d828946408be2d8a6).

In the module the 27 facet ids are 8-byte zero-initialized variables, which the locale code numbers on first use through locale::id::_Id_cnt, as for the five versioned ids main already exports. ios_base::_Index is a zero 4-byte counter and ios_base::_Sync a one-byte flag that starts at 1. They sit in LocaleSupport.cpp after main's versioned ids, with the same start values.

These are data only. This libc still has no versioned facets or streams behind them, so they let a title that imports them load and keep its own numbering; they do not add behavior.

Tested

Windows x86-64, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON, main 88bcfc7a7b0. Exact tested commit: aae14a4ddc6.

  • Built libc, libkernel, their NID-patched production libraries and the related tests. The new guest_sce_v2_facet_ids passes, along with guest_sce_v2_locale and guest_locale.
  • The NID-patched libc exports all 29 NIDs above.
  • The sizes, addresses and start values were read from the module's symbol table and segments: the ids and _Index are in .bss, and _Sync is the byte 01 in .data.
  • The new test checks that every id starts at 0, that _Sync is one byte holding true, that _Index is 0, and that no two exports share storage.
  • Negative control: _Sync started at false, then one id started at 1. The new CTest failed on each. The source was then restored byte for byte (SHA-256 checked) and rebuilt, and the test passed again.
  • Code conventions and git diff --check pass.
  • tools/pr_overlap.py read 1,876 open PRs at the tested commit and reports no overlap. It keeps exit 2 for 29 branches that already conflict with main. Merging each of the 29 with this branch and with main using git merge-tree gives the same conflict blocks. #13449 and #13486 name the unversioned codecvt<char16_t, char> and codecvt<char32_t, char> type names, not these ids, and add none of these NIDs. The branch also merges cleanly with #15336, #15471, #15484, #15490, #15501, #15519, #15552, #15561, #15602, #15614, #15667, #15683, #15791, #15796, #15809, #15834 and #15879.

Not tested: Linux, macOS, another SDK, a game, GPU or console. No game compatibility claim. No original module, extracted bytes, harness or log is committed or uploaded.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5163907257 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15923). Originally posted by [Danigamer05](https://github.com/Danigamer05) on 2026-11-05T00:27:48Z. --- ### What Export the remaining `std::__sce_v2` facet ids and the versioned `ios_base::_Sync` and `ios_base::_Index` from libc. | Export | NID | Original address | | --- | --- | --- | | `_ZNSt8__sce_v28ios_base5_SyncE` | `a05EUj+p6LA` | `0x1939E4` | | `_ZNSt8__sce_v25ctypeItE2idE` | `-WAEp-LsQK8` | `0x197928` | | `_ZNSt8__sce_v27codecvtItc9_MbstatetE2idE` | `vKLkrWOC908` | `0x197930` | | `_ZNSt8__sce_v27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE` | `CvgG53ICQZ8` | `0x198020` | | `_ZNSt8__sce_v27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE` | `00lxRufmIV8` | `0x198028` | | `_ZNSt8__sce_v27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE` | `XUnjw9qmjZk` | `0x198038` | | `_ZNSt8__sce_v28numpunctIwE2idE` | `69nx-zgXr0o` | `0x198048` | | `_ZNSt8__sce_v27codecvtIcc9_MbstatetE2idE` | `ef0jk36lGzM` | `0x198050` | | `_ZNSt8__sce_v27collateIcE2idE` | `UhVg8P8OCOQ` | `0x198058` | | `_ZNSt8__sce_v27collateIwE2idE` | `fjxxWfxa3g8` | `0x198060` | | `_ZNSt8__sce_v28messagesIcE2idE` | `xLZL2qvPy5M` | `0x198068` | | `_ZNSt8__sce_v28messagesIwE2idE` | `HdKMR94lfAM` | `0x198070` | | `_ZNSt8__sce_v210moneypunctIcLb0EE2idE` | `yIcTxIYUO+k` | `0x198078` | | `_ZNSt8__sce_v210moneypunctIcLb1EE2idE` | `fGdtCU3pAWA` | `0x198080` | | `_ZNSt8__sce_v210moneypunctIwLb0EE2idE` | `fazFp6JG9Uo` | `0x198088` | | `_ZNSt8__sce_v210moneypunctIwLb1EE2idE` | `sn-Jk8s1+9A` | `0x198090` | | `_ZNSt8__sce_v29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE` | `21EZf6FejHE` | `0x198098` | | `_ZNSt8__sce_v29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE` | `K2giEFoly0M` | `0x1980A0` | | `_ZNSt8__sce_v29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE` | `Ixyr-5QNxDA` | `0x1980A8` | | `_ZNSt8__sce_v29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE` | `NlLpvZiX8fE` | `0x1980B0` | | `_ZNSt8__sce_v28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE` | `X98EAGBf678` | `0x1980B8` | | `_ZNSt8__sce_v28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE` | `MYYj-E+1gAs` | `0x1980C0` | | `_ZNSt8__sce_v28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE` | `dBdmM6nkpn0` | `0x1980C8` | | `_ZNSt8__sce_v28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE` | `-AmVeGEwTx0` | `0x1980D0` | | `_ZNSt8__sce_v28ios_base6_IndexE` | `bWxIM09FkrI` | `0x198508` | | `_ZNSt8__sce_v27codecvtIDsDu9_MbstatetE2idE` | `qhaUpV8-EbQ` | `0x198E58` | | `_ZNSt8__sce_v27codecvtIDiDu9_MbstatetE2idE` | `yqJXbXHoCoQ` | `0x198E60` | | `_ZNSt8__sce_v27codecvtIDsc9_MbstatetE2idE` | `pKpcusqjEpA` | `0x198E68` | | `_ZNSt8__sce_v27codecvtIDic9_MbstatetE2idE` | `DnSrcExa0xU` | `0x198E70` | The behavior comes from the `libc.prx` bundled with PPSA03671 v01.001.005 (J03848509, SHA-256 `483961e086b8a1fffa8138b3c0badf798987fb5f35ec908d828946408be2d8a6`). In the module the 27 facet ids are 8-byte zero-initialized variables, which the locale code numbers on first use through `locale::id::_Id_cnt`, as for the five versioned ids main already exports. `ios_base::_Index` is a zero 4-byte counter and `ios_base::_Sync` a one-byte flag that starts at 1. They sit in `LocaleSupport.cpp` after main's versioned ids, with the same start values. These are data only. This libc still has no versioned facets or streams behind them, so they let a title that imports them load and keep its own numbering; they do not add behavior. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows x86-64, WinLibs GCC 15.2.0, Release, `BUILD_TESTING=ON`, main `88bcfc7a7b0`. Exact tested commit: `aae14a4ddc6`. - Built libc, libkernel, their NID-patched production libraries and the related tests. The new `guest_sce_v2_facet_ids` passes, along with `guest_sce_v2_locale` and `guest_locale`. - The NID-patched libc exports all 29 NIDs above. - The sizes, addresses and start values were read from the module's symbol table and segments: the ids and `_Index` are in `.bss`, and `_Sync` is the byte `01` in `.data`. - The new test checks that every id starts at 0, that `_Sync` is one byte holding true, that `_Index` is 0, and that no two exports share storage. - Negative control: `_Sync` started at false, then one id started at 1. The new CTest failed on each. The source was then restored byte for byte (SHA-256 checked) and rebuilt, and the test passed again. - Code conventions and `git diff --check` pass. - `tools/pr_overlap.py` read 1,876 open PRs at the tested commit and reports no overlap. It keeps exit 2 for 29 branches that already conflict with main. Merging each of the 29 with this branch and with main using `git merge-tree` gives the same conflict blocks. #13449 and #13486 name the unversioned `codecvt<char16_t, char>` and `codecvt<char32_t, char>` type names, not these ids, and add none of these NIDs. The branch also merges cleanly with #15336, #15471, #15484, #15490, #15501, #15519, #15552, #15561, #15602, #15614, #15667, #15683, #15791, #15796, #15809, #15834 and #15879. Not tested: Linux, macOS, another SDK, a game, GPU or console. No game compatibility claim. No original module, extracted bytes, harness or log is committed or uploaded. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15923
No description provided.