feat(libSceNetCtl): declare sceNetCtlGetInfoV6 #7612

Merged
Lindamea1 merged 1 commit from upstream-pr/7612 into main 2026-10-19 23:20:07 +00:00
Lindamea1 commented 2026-10-18 16:57:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Lindamea1 on 2026-10-18T16:57:43Z.


What

libSceNetCtl exports sceNetCtlGetStateV6, sceNetCtlRegisterCallbackV6 and sceNetCtlUnregisterCallbackV6, but not sceNetCtlGetInfoV6 (NID Jy1EO5GdlcM), so a title that imports it does not start. On Linux the relinked executable carries the import as an undefined global function and has DF_BIND_NOW (LinuxElfPatcher.cpp), and ld.so stops with symbol lookup error: undefined symbol: Jy1EO5GdlcM (exit 127) before the libraries' start-up code runs. On Windows the entry stub prints FAIL: unresolved ELF import Jy1EO5GdlcM from libSceNetCtl.prx (WindowsEntryStubBuilder.cpp), lists the searched libraries and raises 0xC0000139 before the ELF entry point (L720-L731); the Windows path is from the code, not from a run.

Dragon Ball Xenoverse 2 (PPSA08587) imports it: its tester, LuisAguilarDev, lists sceNetCtlGetInfoV6 in #6591 among the imports main lacks ("Imported but missing; not called yet"), and with them declared locally the title reaches its logos and loading screen. The thread does not quote the FAIL line. On main the title stops earlier, at Failed to load module: libSceNpTus.prx (#6592): the Windows entry stub loads the modules a title imports from before it resolves any import, and raises 0xC0000135 when one does not load (L526-L549), so the FAIL line for Jy1EO5GdlcM can only show once #6592 is in. The same list names sceNpSessionSignalingGetGroupInfo, which #7125 has since declared for PPSA31327. The name hashes to Jy1EO5GdlcM (tools/nid_names.py --name), and the aerolib list that tools/nid_names.py reads maps Jy1EO5GdlcM to sceNetCtlGetInfoV6.

It is a Sony network-control call with no FreeBSD counterpart, and neither its parameters nor the layout of the IPv6 information it returns are established in the repository or its technical debt. So it is declared without parameters and throws through NotImplemented_nid_no_patch (General.cpp), as CONTRIBUTING.md asks of exports that cannot be implemented and as #7125 did for the PPSA31327 imports. It is recorded under Unknown function info in docs/dev/debt/libSceNetCtl.md.

Where this still falls short:

  • A call throws sceNetCtlGetInfoV6 not implemented instead of answering. The tester reports that the title does not call it before its loading screen.
  • PPSA08587 does not load with this change alone. #6592 (libSceNpTus) has merged. The title also needs the libkernel exports scePthreadAttrGetschedpolicy and scePthreadAttrGetinheritsched, which main does not export either; #7611 adds them. With this PR and #7611, every library and import the thread lists as missing is provided. With #6592 and these exports applied locally, the tester reports the next stop in AGC (stencil clear requires a writable stencil plane).

Tested

Gentoo Linux, kernel 7.2.8, GCC 16.2.1, glibc 2.43, Release, BUILD_TESTING=ON.

Rebased onto main 97d5d7a52 on 2026-10-19. #6720, merged since, rewrote the sceNetCtlGetInfo entry just below the new debt line. The rebase keeps #6720's text and puts the new entry above it; the code change is the same. On that base:

  • The built libSceNetCtl.prx exports Jy1EO5GdlcM (nm -D).
  • The 209 tests tools/select_tests.py selects for the change pass.
  • Export.cpp compiles with x86_64-w64-mingw32-g++ (-fsyntax-only -Wall -Wextra) without warnings. The unused arg warnings mentioned below are gone, since main now keeps the callback argument.
  • tools/check_conventions.py passes. tools/pr_overlap.py --branch finds no overlap with another pull request. As before, it could not compare #6039 and #7201, which conflict with main.

The results below are from the original base, main 889cee5f9.

  • The built libSceNetCtl.prx exports Jy1EO5GdlcM (nm -D); built from main it does not.
  • Relink probe: an executable made with the relinker's test fixture (core/relinker/relinker/tests/guest_import_fixtures.py), whose entry calls sceNetCtlInit and which also imports Jy1EO5GdlcM from libSceNetCtl without calling it, relinked for Linux by the built relinker with default options (unused-filter=0; readelf shows BIND_NOW and both NIDs as undefined global functions). With only Export.cpp reverted to main, it stops with symbol lookup error: undefined symbol: Jy1EO5GdlcM, exit 127, without the host CPU line the libraries print at start-up. With the change, LD_DEBUG=bindings shows both NIDs bound to libSceNetCtl.prx, and under gdb the entry calls sceNetCtlInit in the built library, which returns 0. The fixture's entry then returns, which a title's entry never does, and the process stops at the ud2 that follows the call in the relinked entry point (SIGILL), as a control executable that imports only sceNetCtlInit does with and without the change.
  • A native probe linked against the built libraries: sceNetCtlGetInfoV6() throws std::runtime_error with sceNetCtlGetInfoV6 not implemented.
  • No test is added: CONTRIBUTING.md asks for no tests that only check that a symbol is exported. guest_net_ctl and guest_sce_net pass, as do all 193 tests tools/select_tests.py selects for the change.
  • Full ctest -j6 --timeout 300: 1452 tests, 0 failed, 13 skipped (the 11 video_out_flip_* tests, video_out_frame_dump_queue and agc_driver_stencil_ref_export, which skip on main on this machine too).
  • Windows: Export.cpp compiles with x86_64-w64-mingw32-g++ 16.2 (-fsyntax-only -Wall -Wextra). Its only warnings are the unused arg parameters of sceNetCtlRegisterCallback and sceNetCtlRegisterCallbackV6, which main has too. This is a syntax check, not a Windows build or run.
  • tools/check_conventions.py passes against main. tools/pr_overlap.py --branch reports one overlap: #6720 rewrites the sceNetCtlGetInfo entry in docs/dev/debt/libSceNetCtl.md, the line below the new entry (L8-9). It could not compare #6039 and #7201, which conflict with main. Merged with this branch, each conflicts in the same files as when merged with main: #7201 in none of the files of this change, and #6039 in docs/dev/debt/libSceNetCtl.md, at the one place where it already conflicts with main. The Export.cpp changes of #6138, #6685, #6720 and #7332 merge with this branch without a conflict.

Not run with PPSA08587. Not run on Windows, macOS or a console.

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: PPSA08587 #6591 (with #7611; #6592 has merged)
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4910997145 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7612). Originally posted by [Lindamea1](https://github.com/Lindamea1) on 2026-10-18T16:57:43Z. --- ### What libSceNetCtl exports `sceNetCtlGetStateV6`, `sceNetCtlRegisterCallbackV6` and `sceNetCtlUnregisterCallbackV6`, but not `sceNetCtlGetInfoV6` (NID `Jy1EO5GdlcM`), so a title that imports it does not start. On Linux the relinked executable carries the import as an undefined global function and has `DF_BIND_NOW` ([`LinuxElfPatcher.cpp`](https://github.com/boykopovar/AnyPS5/blob/e5f18ea99ab2aa593ca1a49b07de9542fe9054cd/core/relinker/elfpatcher/src/linux/LinuxElfPatcher.cpp#L285-L286)), and ld.so stops with `symbol lookup error: undefined symbol: Jy1EO5GdlcM` (exit 127) before the libraries' start-up code runs. On Windows the entry stub prints `FAIL: unresolved ELF import Jy1EO5GdlcM from libSceNetCtl.prx` ([`WindowsEntryStubBuilder.cpp`](https://github.com/boykopovar/AnyPS5/blob/e5f18ea99ab2aa593ca1a49b07de9542fe9054cd/core/relinker/elfpatcher/src/windows/WindowsEntryStubBuilder.cpp#L235-L236)), lists the searched libraries and raises `0xC0000139` before the ELF entry point ([L720-L731](https://github.com/boykopovar/AnyPS5/blob/e5f18ea99ab2aa593ca1a49b07de9542fe9054cd/core/relinker/elfpatcher/src/windows/WindowsEntryStubBuilder.cpp#L720-L731)); the Windows path is from the code, not from a run. Dragon Ball Xenoverse 2 (PPSA08587) imports it: its tester, LuisAguilarDev, lists `sceNetCtlGetInfoV6` in #6591 among the imports `main` lacks ("Imported but missing; not called yet"), and with them declared locally the title reaches its logos and loading screen. The thread does not quote the `FAIL` line. On `main` the title stops earlier, at `Failed to load module: libSceNpTus.prx` (#6592): the Windows entry stub loads the modules a title imports from before it resolves any import, and raises `0xC0000135` when one does not load ([L526-L549](https://github.com/boykopovar/AnyPS5/blob/e5f18ea99ab2aa593ca1a49b07de9542fe9054cd/core/relinker/elfpatcher/src/windows/WindowsEntryStubBuilder.cpp#L526-L549)), so the `FAIL` line for `Jy1EO5GdlcM` can only show once #6592 is in. The same list names `sceNpSessionSignalingGetGroupInfo`, which #7125 has since declared for PPSA31327. The name hashes to `Jy1EO5GdlcM` (`tools/nid_names.py --name`), and the aerolib list that `tools/nid_names.py` reads maps `Jy1EO5GdlcM` to `sceNetCtlGetInfoV6`. It is a Sony network-control call with no FreeBSD counterpart, and neither its parameters nor the layout of the IPv6 information it returns are established in the repository or its technical debt. So it is declared without parameters and throws through `NotImplemented_nid_no_patch` ([`General.cpp`](https://github.com/boykopovar/AnyPS5/blob/e5f18ea99ab2aa593ca1a49b07de9542fe9054cd/core/libs/prx/libc/src/General.cpp#L617-L619)), as CONTRIBUTING.md asks of exports that cannot be implemented and as #7125 did for the PPSA31327 imports. It is recorded under Unknown function info in `docs/dev/debt/libSceNetCtl.md`. Where this still falls short: - A call throws `sceNetCtlGetInfoV6 not implemented` instead of answering. The tester reports that the title does not call it before its loading screen. - PPSA08587 does not load with this change alone. #6592 (libSceNpTus) has merged. The title also needs the libkernel exports `scePthreadAttrGetschedpolicy` and `scePthreadAttrGetinheritsched`, which `main` does not export either; #7611 adds them. With this PR and #7611, every library and import the thread lists as missing is provided. With #6592 and these exports applied locally, the tester reports the next stop in AGC (`stencil clear requires a writable stencil plane`). ### 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. --> Gentoo Linux, kernel 7.2.8, GCC 16.2.1, glibc 2.43, Release, `BUILD_TESTING=ON`. Rebased onto `main` 97d5d7a52 on 2026-10-19. #6720, merged since, rewrote the `sceNetCtlGetInfo` entry just below the new debt line. The rebase keeps #6720's text and puts the new entry above it; the code change is the same. On that base: - The built `libSceNetCtl.prx` exports `Jy1EO5GdlcM` (`nm -D`). - The 209 tests `tools/select_tests.py` selects for the change pass. - `Export.cpp` compiles with `x86_64-w64-mingw32-g++` (`-fsyntax-only -Wall -Wextra`) without warnings. The unused `arg` warnings mentioned below are gone, since `main` now keeps the callback argument. - `tools/check_conventions.py` passes. `tools/pr_overlap.py --branch` finds no overlap with another pull request. As before, it could not compare #6039 and #7201, which conflict with `main`. The results below are from the original base, `main` 889cee5f9. - The built `libSceNetCtl.prx` exports `Jy1EO5GdlcM` (`nm -D`); built from `main` it does not. - Relink probe: an executable made with the relinker's test fixture (`core/relinker/relinker/tests/guest_import_fixtures.py`), whose entry calls `sceNetCtlInit` and which also imports `Jy1EO5GdlcM` from libSceNetCtl without calling it, relinked for Linux by the built relinker with default options (`unused-filter=0`; `readelf` shows `BIND_NOW` and both NIDs as undefined global functions). With only `Export.cpp` reverted to `main`, it stops with `symbol lookup error: undefined symbol: Jy1EO5GdlcM`, exit 127, without the host CPU line the libraries print at start-up. With the change, `LD_DEBUG=bindings` shows both NIDs bound to `libSceNetCtl.prx`, and under gdb the entry calls `sceNetCtlInit` in the built library, which returns 0. The fixture's entry then returns, which a title's entry never does, and the process stops at the `ud2` that follows the call in the relinked entry point (SIGILL), as a control executable that imports only `sceNetCtlInit` does with and without the change. - A native probe linked against the built libraries: `sceNetCtlGetInfoV6()` throws `std::runtime_error` with `sceNetCtlGetInfoV6 not implemented`. - No test is added: CONTRIBUTING.md asks for no tests that only check that a symbol is exported. `guest_net_ctl` and `guest_sce_net` pass, as do all 193 tests `tools/select_tests.py` selects for the change. - Full `ctest -j6 --timeout 300`: 1452 tests, 0 failed, 13 skipped (the 11 `video_out_flip_*` tests, `video_out_frame_dump_queue` and `agc_driver_stencil_ref_export`, which skip on `main` on this machine too). - Windows: `Export.cpp` compiles with `x86_64-w64-mingw32-g++` 16.2 (`-fsyntax-only -Wall -Wextra`). Its only warnings are the unused `arg` parameters of `sceNetCtlRegisterCallback` and `sceNetCtlRegisterCallbackV6`, which `main` has too. This is a syntax check, not a Windows build or run. - `tools/check_conventions.py` passes against `main`. `tools/pr_overlap.py --branch` reports one overlap: #6720 rewrites the `sceNetCtlGetInfo` entry in `docs/dev/debt/libSceNetCtl.md`, the line below the new entry (L8-9). It could not compare #6039 and #7201, which conflict with `main`. Merged with this branch, each conflicts in the same files as when merged with `main`: #7201 in none of the files of this change, and #6039 in `docs/dev/debt/libSceNetCtl.md`, at the one place where it already conflicts with `main`. The `Export.cpp` changes of #6138, #6685, #6720 and #7332 merge with this branch without a conflict. Not run with PPSA08587. Not run on Windows, macOS or a console. ### 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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: PPSA08587 #6591 (with #7611; #6592 has merged) <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no --> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-18 16:58:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T16:58:29Z.


Progress report (97d5d7a → d8baccc)

📉 System libraries: 82.49% (-0.02%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libSceNetCtl sceNetCtlGetInfoV6
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252604125 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7612#issuecomment-6252604125). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T16:58:29Z. --- <!-- progress-report --> ### Progress report (97d5d7a → d8baccc) 📉 **System libraries**: 82.49% (-0.02%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libSceNetCtl | `sceNetCtlGetInfoV6` | </details>
github-actions[bot] commented 2026-10-18 17:23:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T17:23:01Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8100 sceNetCtlGetInfoV6

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6039 docs/dev/debt/libSceNetCtl.md
PR 7201 core/libs/prx/libSceNetCtl/Export.cpp
PR 8100 core/libs/prx/libSceNetCtl/Export.cpp
docs/dev/debt/libSceNetCtl.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252858687 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7612#issuecomment-6252858687). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T17:23:01Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 8100](https://www.github.com/boykopovar/AnyPS5/pull/8100) | | `sceNetCtlGetInfoV6` | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6039](https://www.github.com/boykopovar/AnyPS5/pull/6039) | `docs/dev/debt/libSceNetCtl.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceNetCtl/Export.cpp` | | [PR 8100](https://www.github.com/boykopovar/AnyPS5/pull/8100) | `core/libs/prx/libSceNetCtl/Export.cpp`<br>`docs/dev/debt/libSceNetCtl.md` |
LeandroLP23 commented 2026-10-18 18:06:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T18:06:15Z.


Windows run, since the description lists Windows as not run. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. Build: main c3591adf9 with #7623, #7612, #7611, #7603, #7579, #7563 and #7541 merged together (each merge clean, built once).

The build is clean, and guest_net_ctl and guest_sce_net pass 3 runs of 3.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253307378 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7612#issuecomment-6253307378). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T18:06:15Z. --- Windows run, since the description lists Windows as not run. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. Build: `main` `c3591adf9` with #7623, #7612, #7611, #7603, #7579, #7563 and #7541 merged together (each merge clean, built once). The build is clean, and `guest_net_ctl` and `guest_sce_net` pass 3 runs of 3. AI-assisted
ycarogabriel-lgtm commented 2026-10-19 00:13:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ycarogabriel-lgtm on 2026-10-19T00:13:31Z.


Ran this on macOS, since it was not run there: Apple M1, macOS 26.6.2 (25G83), x86-64 build under Rosetta 2, AppleClang 21. Merged into the macOS host branch of #7332 (57bccfbfc, main at d71853cf2) together with #7121, #7475, #7490, #7507 and #7612; Release build.

  • It builds.
  • libSceNetCtl.prx (a Mach-O dylib on macOS) exports _sceNetCtlGetInfoV6.
  • guest_net_ctl passes.
  • No title was run.

AI-assisted: yes (Claude Code). I ran the build and tests on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256922523 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7612#issuecomment-6256922523). Originally posted by [ycarogabriel-lgtm](https://github.com/ycarogabriel-lgtm) on 2026-10-19T00:13:31Z. --- Ran this on macOS, since it was not run there: Apple M1, macOS 26.6.2 (25G83), x86-64 build under Rosetta 2, AppleClang 21. Merged into the macOS host branch of #7332 (`57bccfbfc`, `main` at `d71853cf2`) together with #7121, #7475, #7490, #7507 and #7612; `Release` build. - It builds. - `libSceNetCtl.prx` (a Mach-O dylib on macOS) exports `_sceNetCtlGetInfoV6`. - `guest_net_ctl` passes. - No title was run. AI-assisted: yes (Claude Code). I ran the build and tests on my machine.
adriadam10 commented 2026-10-19 23:21:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T23:21:04Z.


Checked the declaration against the aerolib NID, the throwing-stub convention and the debt entry (Unknown function info); Windows and macOS builds confirmed by @LeandroLP23 and @ycarogabriel-lgtm; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6279520857 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7612#issuecomment-6279520857). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T23:21:04Z. --- Checked the declaration against the aerolib NID, the throwing-stub convention and the debt entry (Unknown function info); Windows and macOS builds confirmed by @LeandroLP23 and @ycarogabriel-lgtm; merged.
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!7612
No description provided.