feat(libSceNet): export sce_net_in6addr_linklocal_allnodes #3707

Merged
overlordxrz-source merged 1 commit from upstream-pr/3707 into main 2026-10-11 21:53:52 +00:00
overlordxrz-source commented 2026-10-11 15:42:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by overlordxrz-source on 2026-10-11T15:42:45Z.


What

Exports sce_net_in6addr_linklocal_allnodes (84MgU4MMTLQ) from libSceNet: the 16-byte IPv6 link-local all-nodes address ff02::1, next to the existing sce_net_in6addr_any, with 4-byte alignment like the struct in6_addr it stands for.

Resident Evil 4 (PPSA07411) stops on it at start-up. @xXPBSXx reported on #2591 (Windows 10, MinGW-w64 GCC 15.2) that once the missing Party.prx is skipped, the title

stops at unresolved ELF import 84MgU4MMTLQ from libSceNet.prx, which is the export from #1808.

That run was on main 57f96fd2 with #2872, #2658 and the Party.prx skip (ce0b99ac plus the one-line imported[index] change). All of these are on main now: #2872 is merged, pthread_attr_setsolosched_np came in through #3176, and the skip with that exact line came in through #3129. #2776 and #3043 also list this object as absent for RE4 and PRAGMATA (PPSA02530).

This is #1808 by @eliasbruno124-dev, which was closed because Onimusha 2 did not stop on it on main. RE4 now does. The commit credits that PR's author as co-author, and the test follows theirs.

The value is IN6ADDR_LINKLOCAL_ALLNODES_INIT from FreeBSD's netinet6/in6.h and RFC 4291 section 2.7.1. The object is read-only, as in6addr_linklocal_allnodes is in FreeBSD.

Tested

  • guest_sce_net gets CheckLinkLocalAllNodesIpv6. It checks that the object is 4-byte aligned and equals sceNetInetPton(AF_INET6, "ff02::1"). It checks that sceNetInetNtop writes ff02::1 into exactly 8 bytes without touching the next one, and fails with ENOSPC (28) into 7 bytes. It also checks that the text parses back to the same bytes.
  • Cross-compiled with zig 0.17 (-target x86_64-linux-gnu -std=c++20): libSceNet/Export.cpp and tests/GuestSceNet.cpp build without errors. In the object file, sce_net_in6addr_linklocal_allnodes is a global 16-byte .rodata symbol holding ff020000000000000000000000000001. The name hashes to 84MgU4MMTLQ, which matches the aerolib entry.
  • A native run of the same checks against the exported definition passes. A mutant with ff01 instead of ff02 aborts.
  • python3 tools/check_conventions.py: all checks pass.
  • I did not run RE4 myself. The stop above is @xXPBSXx's report.

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
  • No notes, investigation .md files or images added to the repository
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4820249418 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3707). Originally posted by [overlordxrz-source](https://github.com/overlordxrz-source) on 2026-10-11T15:42:45Z. --- ### What Exports `sce_net_in6addr_linklocal_allnodes` (`84MgU4MMTLQ`) from libSceNet: the 16-byte IPv6 link-local all-nodes address `ff02::1`, next to the existing `sce_net_in6addr_any`, with 4-byte alignment like the `struct in6_addr` it stands for. Resident Evil 4 (PPSA07411) stops on it at start-up. @xXPBSXx reported on [#2591](https://github.com/boykopovar/AnyPS5/issues/2591#issuecomment-6101491669) (Windows 10, MinGW-w64 GCC 15.2) that once the missing `Party.prx` is skipped, the title > stops at `unresolved ELF import 84MgU4MMTLQ from libSceNet.prx`, which is the export from #1808. That run was on `main` 57f96fd2 with #2872, #2658 and the `Party.prx` skip (ce0b99ac plus the one-line `imported[index]` change). All of these are on `main` now: #2872 is merged, `pthread_attr_setsolosched_np` came in through #3176, and the skip with that exact line came in through #3129. #2776 and #3043 also list this object as absent for RE4 and PRAGMATA (PPSA02530). This is #1808 by @eliasbruno124-dev, which was closed because Onimusha 2 did not stop on it on `main`. RE4 now does. The commit credits that PR's author as co-author, and the test follows theirs. The value is `IN6ADDR_LINKLOCAL_ALLNODES_INIT` from FreeBSD's [`netinet6/in6.h`](https://github.com/freebsd/freebsd-src/blob/releng/11.4/sys/netinet6/in6.h) and [RFC 4291 section 2.7.1](https://www.rfc-editor.org/rfc/rfc4291#section-2.7.1). The object is read-only, as `in6addr_linklocal_allnodes` is in FreeBSD. ### Tested - `guest_sce_net` gets `CheckLinkLocalAllNodesIpv6`. It checks that the object is 4-byte aligned and equals `sceNetInetPton(AF_INET6, "ff02::1")`. It checks that `sceNetInetNtop` writes `ff02::1` into exactly 8 bytes without touching the next one, and fails with `ENOSPC` (28) into 7 bytes. It also checks that the text parses back to the same bytes. - Cross-compiled with zig 0.17 (`-target x86_64-linux-gnu -std=c++20`): `libSceNet/Export.cpp` and `tests/GuestSceNet.cpp` build without errors. In the object file, `sce_net_in6addr_linklocal_allnodes` is a global 16-byte `.rodata` symbol holding `ff020000000000000000000000000001`. The name hashes to `84MgU4MMTLQ`, which matches the aerolib entry. - A native run of the same checks against the exported definition passes. A mutant with `ff01` instead of `ff02` aborts. - `python3 tools/check_conventions.py`: all checks pass. - I did not run RE4 myself. The stop above is @xXPBSXx's report. ### Checklist - [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 - [x] No notes, investigation `.md` files or images added to the repository - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
adriadam10 commented 2026-10-11 21:53:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:53:47Z.


Checked: sce_net_in6addr_linklocal_allnodes hashes to 84MgU4MMTLQ (aerolib), value ff02::1 matches RFC 4291 2.7.1 / FreeBSD IN6ADDR_LINKLOCAL_ALLNODES_INIT, 4-byte aligned. Built on current main, guest_sce_net passes, and without the export the test no longer links. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114216642 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3707#issuecomment-6114216642). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:53:47Z. --- Checked: `sce_net_in6addr_linklocal_allnodes` hashes to `84MgU4MMTLQ` (aerolib), value `ff02::1` matches RFC 4291 2.7.1 / FreeBSD `IN6ADDR_LINKLOCAL_ALLNODES_INIT`, 4-byte aligned. Built on current main, `guest_sce_net` passes, and without the export the test no longer links. Merging.
xXPBSXx commented 2026-10-11 22:50:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T22:50:31Z.


Test from Resident Evil 4 (PPSA07411) and PRAGMATA (PPSA02530), Windows, MinGW GCC 15.2.0: both end in the loader with FAIL: unresolved ELF import 84MgU4MMTLQ from libSceNet.prx on main plus the other open export PRs. With this PR added, the stop moves to the next unresolved import and with the rest of the stack applied the titles get through the loader. Not tested: this PR alone.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114784224 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3707#issuecomment-6114784224). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T22:50:31Z. --- Test from Resident Evil 4 (PPSA07411) and PRAGMATA (PPSA02530), Windows, MinGW GCC 15.2.0: both end in the loader with `FAIL: unresolved ELF import 84MgU4MMTLQ from libSceNet.prx` on `main` plus the other open export PRs. With this PR added, the stop moves to the next unresolved import and with the rest of the stack applied the titles get through the loader. Not tested: this PR alone. AI-assisted (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!3707
No description provided.