refactor(prx): name the LibcInternal Export.cpp pending stubs the NID database resolves #15992

Merged
ItsJustChrisE merged 3 commits from upstream-pr/15992 into main 2026-11-09 04:57:18 +00:00
ItsJustChrisE commented 2026-11-05 06:58:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ItsJustChrisE on 2026-11-05T06:58:48Z.


What

Names 41 of the 149 sceLibcInternalPending4_*_nid_no_patch placeholders in libSceLibcInternal/Export.cpp after the symbols tools/nid_names.py resolves through its pinned aerolib database, the same names the libSceLibcInternal debt file already lists for them. As in #15678 and #15777, the names carry the _nid_postfix suffix so they never collide with the host C++ runtime, and they are declared once in the new include/PendingExports.hpp, which the library umbrella header includes.

The other 108 are left as they are, because #5021, #13486, #13782, #14373, #15582, #15665, #15692, #15715, #16005, #16024 and #17628 implement or edit them or the stubs next to them; renaming them here would conflict with those PRs. That includes the 9 time_get and bad_alloc::_Doraise members #16005 and #16024 implement and 9 stubs bordering their hunks, which earlier revisions of this PR named, and the 19 money_get and money_put members #17628 implements. They can be named once those land.

Every renamed body still throws through NotImplemented_nid_no_patch, and the library exports the same NIDs as on main. A title that reaches one now fails with the function's name instead of the placeholder's. The debt entries already name each export, so they are unchanged.

Tested

Ubuntu 26.04.1 on WSL2, GCC 15.2.0, Release, main 8e34d2642d, head ac407d092f. No title or homebrew run.

  • compute_nid(name) == nid for all 41.
  • nm -D on the patched libSceLibcInternal.prx of main and this branch: identical NID sets (1168); the placeholder helpers drop from 690 to 649.
  • Full build, then ctest -R 'public_headers|patched_librar': 66 of 66 passed.
  • tools/check_conventions.py --base origin/main: passed.
  • tools/pr_overlap.py --branch: 1974 open pull requests probed; it no longer reports #17628. Earlier it reported only #16005 and #16024; git merge-tree of this branch with each of them, and with #15989, is now clean. #5021, #15581 and #17300 already conflict with main, so the tool could not compare them; #17300 renames none of the 41.
  • Not run: Windows, the wider test suite.

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:5167507501 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15992). Originally posted by [ItsJustChrisE](https://github.com/ItsJustChrisE) on 2026-11-05T06:58:48Z. --- ### What Names 41 of the 149 `sceLibcInternalPending4_*_nid_no_patch` placeholders in `libSceLibcInternal/Export.cpp` after the symbols `tools/nid_names.py` resolves through its pinned [aerolib database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv), the same names the libSceLibcInternal debt file already lists for them. As in #15678 and #15777, the names carry the `_nid_postfix` suffix so they never collide with the host C++ runtime, and they are declared once in the new `include/PendingExports.hpp`, which the library umbrella header includes. The other 108 are left as they are, because #5021, #13486, #13782, #14373, #15582, #15665, #15692, #15715, #16005, #16024 and #17628 implement or edit them or the stubs next to them; renaming them here would conflict with those PRs. That includes the 9 `time_get` and `bad_alloc::_Doraise` members #16005 and #16024 implement and 9 stubs bordering their hunks, which earlier revisions of this PR named, and the 19 `money_get` and `money_put` members #17628 implements. They can be named once those land. Every renamed body still throws through `NotImplemented_nid_no_patch`, and the library exports the same NIDs as on `main`. A title that reaches one now fails with the function's name instead of the placeholder's. The debt entries already name each export, so they are unchanged. ### 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. --> Ubuntu 26.04.1 on WSL2, GCC 15.2.0, Release, `main` `8e34d2642d`, head `ac407d092f`. No title or homebrew run. - `compute_nid(name) == nid` for all 41. - `nm -D` on the patched `libSceLibcInternal.prx` of `main` and this branch: identical NID sets (1168); the placeholder helpers drop from 690 to 649. - Full build, then `ctest -R 'public_headers|patched_librar'`: 66 of 66 passed. - `tools/check_conventions.py --base origin/main`: passed. - `tools/pr_overlap.py --branch`: 1974 open pull requests probed; it no longer reports #17628. Earlier it reported only #16005 and #16024; `git merge-tree` of this branch with each of them, and with #15989, is now clean. #5021, #15581 and #17300 already conflict with `main`, so the tool could not compare them; #17300 renames none of the 41. - Not run: Windows, the wider test suite. ### 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)
gabichuuuuu commented 2026-11-08 21:44:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T21:44:03Z.

Review: COMMENTED


Windows run of head 800d573985, merged onto main 095ff72367 in one tree with other open PRs that touch different files (each PR's test is its own file, so they don't interact). Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release, BUILD_TESTING=ON.

  • libSceLibcInternal builds.
  • NIDs: I hashed each new _nid_postfix name with tools/nid_names.py's compute_nid. All 78 give exactly the 78 NIDs whose APS5_EXPORT lines this PR removes, with none missing and none extra.

This PR and #15989 both edit libSceLibcInternal.hpp. They merged together cleanly here.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5819793724 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15992#pullrequestreview-5819793724). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-08T21:44:03Z. **Review:** COMMENTED --- Windows run of head `800d573985`, merged onto `main` `095ff72367` in one tree with other open PRs that touch different files (each PR's test is its own file, so they don't interact). Setup: Windows 11, WinLibs GCC 15.2 r7 (`x86_64-ucrt-posix-seh`, the CI toolchain), Release, `BUILD_TESTING=ON`. - `libSceLibcInternal` builds. - **NIDs:** I hashed each new `_nid_postfix` name with `tools/nid_names.py`'s `compute_nid`. All 78 give exactly the 78 NIDs whose `APS5_EXPORT` lines this PR removes, with none missing and none extra. This PR and #15989 both edit `libSceLibcInternal.hpp`. They merged together cleanly here.
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!15992
No description provided.