Skip to content

feat(libSceNetCtl): declare sceNetCtlGetInfoV6 - #7612

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
Lindamea1:fix/netctl-getinfov6-export
Oct 19, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
Lindamea1:fix/netctl-getinfov6-export

Conversation

@Lindamea1

@Lindamea1 Lindamea1 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

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:

Tested

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

Rebased onto main 97d5d7a 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 docs: fix Pages workflow link and separate library technical debt #6039 and Macos port #7201, which conflict with main.

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

  • 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: feat(netctl): implement remaining info codes in sceNetCtlGetInfo #6720 rewrites the sceNetCtlGetInfo entry in docs/dev/debt/libSceNetCtl.md, the line below the new entry (L8-9). It could not compare docs: fix Pages workflow link and separate library technical debt #6039 and Macos port #7201, which conflict with main. Merged with this branch, each conflicts in the same files as when merged with main: Macos port #7201 in none of the files of this change, and docs: fix Pages workflow link and separate library technical debt #6039 in docs/dev/debt/libSceNetCtl.md, at the one place where it already conflicts with main. The Export.cpp changes of fix(libSceNetCtl): keep the callback argument and deliver the state from sceNetCtlCheckCallback #6138, fix(libSceNetCtl): read the default route from the routing table on macOS #6685, feat(netctl): implement remaining info codes in sceNetCtlGetInfo #6720 and feat: macOS on Apple Silicon host support (Rosetta 2 and MoltenVK) #7332 merge with this branch without a conflict.

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

Checklist

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Progress report (97d5d7a → d8baccc)

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

🆕 1 declared as stubs
Library Name
libSceNetCtl sceNetCtlGetInfoV6

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

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

@LeandroLP23

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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.

libSceNetCtl exports sceNetCtlGetStateV6, sceNetCtlRegisterCallbackV6
and sceNetCtlUnregisterCallbackV6 but not sceNetCtlGetInfoV6 (NID
Jy1EO5GdlcM). Dragon Ball Xenoverse 2 (PPSA08587) imports it, and an
import that no system library exports stops a title before its entry
point: on Linux ld.so refuses the relinked executable with "undefined
symbol: Jy1EO5GdlcM", and on Windows the entry stub prints "FAIL:
unresolved ELF import Jy1EO5GdlcM from libSceNetCtl.prx" and raises
0xC0000139. The title's tester reports that it does not call the
function before its loading screen.

It is a Sony network-control call with no FreeBSD counterpart, and
neither its parameters nor the IPv6 info layout are known, so it is
declared without parameters and throws through
NotImplemented_nid_no_patch, as CONTRIBUTING.md asks of exports that
cannot be implemented. The gap is recorded in
docs/dev/debt/libSceNetCtl.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Lindamea1
Lindamea1 force-pushed the fix/netctl-getinfov6-export branch from e56cbef to d8baccc Compare October 19, 2026 11:11
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 19, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
@adriadam10
adriadam10 merged commit 606ebaf into boykopovar:main Oct 19, 2026
11 of 12 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs prx unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants