PS5 linker: every unresolved import in a homebrew eboot.bin is a *_v0.1 (SYS_V0) symbol #2000

Open
opened 2026-11-26 10:10:57 +00:00 by github-bot · 3 comments
Owner

@⁠lslogis on GitHub · 2026-10-30 11:34 UTC · original

Summary

Three homebrew titles fail to boot for the same linker-level reason. Every import KytyPS5 cannot resolve is tagged <lib>_v0.1; every import it does resolve is tagged <lib>_v1.1. The two sets do not intersect at all, and no *_v0.1 import resolves in any of the three runs. The NID to implementation table appears to have no SYS_V0 (legacy ABI) entries, so anything built against the SDK's v0.1 stub library cannot boot. This is a class-wide gap, not a per-title one.

All 105 unresolved NIDs are ordinary, documented symbols. I decoded them by reverse-running the PS5 NID hash (sha1(symbol + SUFFIX), first 8 bytes reversed, custom alphabet, 11 output characters) against zecoxao/sce_symbols/aerolib.csv (159,034 entries). The hash reproduces that table 400/400, so the names below are exact rather than inferred.

Environment

  • Build: KytyPS5-2026-10-30-4919fdb (official Windows release, kyty_emulator.exe; archive SHA-256 8dc6eb912df9c3083ce1bfa6f6e01f8f5d0442c904cf4bec2ac4e3537ec3954f)
  • Host: Windows 11 10.0.26200 x64, AMD Ryzen 9 9950X3D, NVIDIA GeForce RTX 5080
  • Launch: kyty_emulator --game <directory containing eboot.bin>
  • Inputs: three unsigned homebrew titles, no commercial content
Title ID eboot.bin SHA-256 Outcome
Snes9x PS5 v2.9 PPSA99922 8,785,634 B aa2ef3ef6d0962723b3a22eff8e1c13d0daaa75433df194e86d09ff6f74a99d1 host exception 0xC000001D at eboot+0x1c9, 0 stub calls
Genesis Plus GX PS5 v2.2.1 PPSA99921 61,561,349 B bdd8d8a583334b255500c68f69f0f79d370daad03fdfa6139de4f8f230547904 Guest abort() at libC.cpp:250
SwanStation PS5 PPSA98510 47,115,527 B 27b69b905892829c01faea526ff4cb1f45b6cf7e230dc4cccb98b40a4985d8ca Guest abort() at libC.cpp:250

1. Unresolved imports are all v0.1; resolved imports are all v1.1

Counting Relocate: unresolved … import patched to stub lines, split by image and by the version tag the linker prints:

Title eboot.bin unresolved tag sce_module/libc.prx unresolved tag
Snes9x PS5 v2.9 34 all *_v0.1 7 all *_v1.1
Genesis Plus GX PS5 v2.2.1 66 all *_v0.1 7 all *_v1.1
SwanStation PS5 87 all *_v0.1 7 all *_v1.1

A typical line:

Relocate: unresolved non-PLT import patched to stub [11250] [00000009007fec50] <- 0000000200000000, smbQukfxYJM[LibcInternal_v1][LibcInternal_v0.1][Func], Func, Global, ./snes9x/PPSA99922\eboot.bin

On the resolved side, every hit goes through PS5 NID fallback: with a *_v1.1 tag. libc_v1.1 alone accounts for 395 / 157 / 184 fallback resolutions in the three logs. Intersecting the two sets across all three runs gives zero NIDs that appear both resolved and unresolved, and zero *_v0.1 tags in the fallback histogram. The resolver is not intermittently missing symbols; it has no entries for this ABI version at all.

Decoded, the unresolved set is unremarkable. These 21 symbols are missing from all three eboot.bin files:

  __inet_ntop                                4pYihoPggn8  libkernel_v0.1
  __inet_pton                                fyPeCKJ94Hg  libkernel_v0.1
  dup2                                       wdUufa9g-D8  libkernel_v0.1
  getenv                                     smbQukfxYJM  LibcInternal_v0.1
  getgid                                     AfuS23bX6kg  libkernel_v0.1
  gethostname                                -nvxBWa0iDs  LibcInternal_v0.1
  getuid                                     kg4x8Prhfxw  libkernel_v0.1
  ioctl                                      PfccT7qURYE  libkernel_v0.1
  lstat                                      DRGXpDDh8Ng  libkernel_v0.1
  poll                                       ku7D4q1Y9PI  libkernel_v0.1
  readv                                      I7ImcLds-uU  libkernel_v0.1
  realpath                                   vhtcIgZG-Lk  LibcInternal_v0.1
  rename                                     NN01qLRhiqU  libkernel_v0.1
  sceKernelSendNotificationRequest           zl7hupSO0C0  libkernel_v0.1
  sceUserServiceGetForegroundUser            eNb53LQJmIM  UserService_v0.1
  sigaction                                  KiJEPEWRyUY  libkernel_v0.1
  sigemptyset                                +F7C-hdk7+E  libkernel_v0.1
  signal                                     VADc3MNQ3cM  libkernel_v0.1
  sysconf                                    mkawd0NA9ts  libkernel_v0.1
  sysctl                                     DFmMT80xcNI  libkernel_v0.1
  writev                                     Z2aKdxzS4KE  libkernel_v0.1

Across all three titles there are 99 distinct v0.1 symbols in eboot.bin. They are POSIX and libc entry points (opendir, dlopen/dlsym, mmap, pthread_barrier_*, socketpair, sigaltstack, sysctlbyname) plus two sce* calls. Nothing here is proprietary or obscure.

2. getenv is what actually kills two of them

The unresolved stubs are not merely logged; the ones that execute decide the failure. Both surviving titles die in the same place:

  • Genesis Plus GX — 30 Unresolved import stub called events over 6 distinct symbols (getenv x20, sigaction x6, then pthread_attr_getstackaddr, signal, sigaltstack, sigemptyset). The final 12 events, immediately before Guest abort(), are all smbQukfxYJM = getenv, from one call site (patch_vaddr=0x0000000903628ee0, jmprela_index=180688).
  • SwanStation — 75 events over 8 distinct symbols (getenv x65, opendir x3, sigaction x2, then access, fchmod, geteuid and two others). The final 14 are again getenv, and all 65 getenv hits come from a single site (patch_vaddr=0x0000000902ab86d8, jmprela_index=64628).

In both cases the abort backtrace's failing frame prints %s: %d: out of memory. The guest calls getenv in a loop, receives the stub's NULL, and the allocation path gives up. A single alias for getenv would move both titles past their current stop point.

Unresolved import stub called [29]: patch_vaddr=0x0000000903628ee0 jmprela_index=180688 symbol=smbQukfxYJM[LibcInternal_v1][LibcInternal_v0.1][Func] type=Func bind=Global program=./gx/PPSA99921\eboot.bin
--- Error ---
Guest abort() in D:\a\KytyPS5\KytyPS5\src\libs\libC.cpp:250

3. Snes9x stops earlier, and for a different reason

Snes9x logs 0 stub calls, against 30 and 75 for the other two. It faults inside CRT startup, before main():

--- Execute: Main ---
stack_addr = 7efdf3ee0
 argc = 1
 argv = 0x00000007efdf3ee8
 envp = 0x00000007efdf3ef8
 argv[0] =
--- Guest fault context ---
Unhandled host exception: type=2 code=3221225501 pc=0x00000009000001c9 access=0 address=0x0000000000000000
 in D:\a\KytyPS5\KytyPS5\src\loader\runtimeLinker.cpp:721

code=3221225501 is 0xC000001D (illegal instruction). The eboot.bin base is 0x900000000, so pc is eboot+0x1c9, and the fault context shows that address holds 0f 0b, a ud2. This is the guest's own assertion trap, not a stray pointer. The dump window is pc-48 .. pc+48, with the fault at byte 48:

 83 d7 00 ff 15 3e e7 7f 00 48 85 c0 74 02 5d c3      \
 0f 0b 0f 0b cc cc cc 55 48 89 e5 48 83 ff 01 48       | repeating wrappers
 83 d7 00 ff 15 1e e7 7f 00 48 85 c0 74 02 5d c3      /
 0f 0b 0f 0b cc cc cc 48 83 ff 01 48 83 d7 00 ff      <- byte 48 = 0f 0b (ud2) = pc

Decoding the wrapper that ends at the fault:

  eboot+0x1b0  55                 push rbp
  eboot+0x1b1  48 89 e5           mov  rbp, rsp
  eboot+0x1b4  48 83 ff 01        cmp  rdi, 1
  eboot+0x1b8  48 83 d7 00        or   rdi, 0
  eboot+0x1bc  ff 15 1e e7 7f 00  call qword [rip+0x7fe71e]   -> guest GOT 0x9007fe8e0
  eboot+0x1c2  48 85 c0           test rax, rax
  eboot+0x1c5  74 02              je   +2                     ; rax == 0 -> jump to ud2
  eboot+0x1c7  5d / c3            pop rbp / ret
  eboot+0x1c9  0f 0b              ud2                         <- fault, and rax = 0 in the dump

Four back-to-back wrappers over eboot+0x19c..0x1e8, in both call [rip+…] and jmp [rip+…] form (displacements 0x7fe73e, 0x7fe71e, 0x7fe702, 0x7fe6f2), all target the same GOT slot 0x9007fe8e0. That slot sits below the unresolved-stub patch region, which begins at 0x9007fec50, and the address never appears in the log. So this import was bound, and the bound implementation returned NULL, which the guest's own NULL check converted into a trap.

I could not name that symbol. It is absent from the log, and eboot.bin is a Prospero SELF (magic 4f 15 3d 1d), so the relocation table is not readable without unpacking it first. The observable facts are the shared slot, the NULL return, and the trap.

4. The 7 libc.prx stubs are a separate, smaller gap

These are the only unresolved imports tagged *_v1.1, and they are identical in all three runs because they come from the same SDK libc.prx (SHA-256 e6ff45d16adf687855cc3b33b0c8a4132b6504360b221e0a34c7e99fb3ba0036):

  getrusage                                  hHlZQUnlxSM  libkernel_v1.1
  rmdir                                      c7ZnT7V1B98  libkernel_v1.1
  sceKernelChmod                             fgIsQ10xYVA  libkernel_v1.1
  sceKernelInternalMemoryGetModuleSegmentInfo -YTW+qXc3CQ  libkernel_v1.1
  sceKernelMlock                             3k6kx-zOOSQ  libkernel_v1.1
  sceKernelUtimes                            0Cq8ipKr9n0  libkernel_v1.1
  sceLibcInternalBacktraceForGame            EHsF2i9FXPM  LibcInternal_v1.1

Closing the v0.1 gap would leave these seven in place.

Suggested fix

The v0.1 symbols are the same libc and libkernel functions KytyPS5 already implements under v1.1. The cheapest change is an alias in the NID table: when an import arrives as <lib>_v1 with a *_v0.1 version tag, fall back to the existing *_v1.1 implementation instead of patching a stub. That is 21 aliases to cover all three eboot.bin files in this report, and 99 to cover them individually. getenv alone accounts for 20 of 30 executed stub hits in Genesis Plus GX and 65 of 75 in SwanStation, so it is the highest-value single entry.

Happy to supply the full logs, the decoded per-title symbol tables, and the NID decoding script.

Appendix: full unresolved tables

per-title `eboot.bin` unresolved imports, named

Snes9x PS5 v2.9 (PPSA99922) — 34 imports:

  __inet_aton                                a7ToDPsIQrc  LibcInternal_v0.1
  __inet_ntop                                4pYihoPggn8  libkernel_v0.1
  __inet_pton                                fyPeCKJ94Hg  libkernel_v0.1
  access                                     8vE6Z6VEYyk  libkernel_v0.1
  closedir                                   XepdqehVYe4  LibcInternal_v0.1
  dup2                                       wdUufa9g-D8  libkernel_v0.1
  freeifaddrs                                N2OjwJJGjeQ  LibcInternal_v0.1
  getenv                                     smbQukfxYJM  LibcInternal_v0.1
  getgid                                     AfuS23bX6kg  libkernel_v0.1
  gethostname                                -nvxBWa0iDs  LibcInternal_v0.1
  getifaddrs                                 j-gWL6wDros  LibcInternal_v0.1
  getlogin_r                                 78FiHequa9U  libkernel_v0.1
  getuid                                     kg4x8Prhfxw  libkernel_v0.1
  ioctl                                      PfccT7qURYE  libkernel_v0.1
  lstat                                      DRGXpDDh8Ng  libkernel_v0.1
  opendir                                    ay3uROQAc5A  LibcInternal_v0.1
  poll                                       ku7D4q1Y9PI  libkernel_v0.1
  readdir                                    lybyyKtP54c  LibcInternal_v0.1
  readv                                      I7ImcLds-uU  libkernel_v0.1
  realpath                                   vhtcIgZG-Lk  LibcInternal_v0.1
  rename                                     NN01qLRhiqU  libkernel_v0.1
  sceHttp2AbortRequest                       IZ-qjhRqvjk  Http2_v0.1
  sceKernelSendNotificationRequest           zl7hupSO0C0  libkernel_v0.1
  sceNetResolverStartAton                    Apb4YDxKsRI  Net_v0.1
  sceUserServiceGetForegroundUser            eNb53LQJmIM  UserService_v0.1
  sigaction                                  KiJEPEWRyUY  libkernel_v0.1
  sigaltstack                                sHziAegVp74  libkernel_v0.1
  sigemptyset                                +F7C-hdk7+E  libkernel_v0.1
  signal                                     VADc3MNQ3cM  libkernel_v0.1
  sleep                                      0wu33hunNdE  libkernel_v0.1
  srandom                                    sPC7XE6hfFY  LibcInternal_v0.1
  sysconf                                    mkawd0NA9ts  libkernel_v0.1
  sysctl                                     DFmMT80xcNI  libkernel_v0.1
  writev                                     Z2aKdxzS4KE  libkernel_v0.1

Genesis Plus GX PS5 v2.2.1 (PPSA99921) — 66 imports:

  _Unwind_Backtrace                          s62MgBhosjU  LibcInternal_v0.1
  __inet_ntop                                4pYihoPggn8  libkernel_v0.1
  __inet_pton                                fyPeCKJ94Hg  libkernel_v0.1
  chdir                                      6mMQ1MSPW-Q  libkernel_v0.1
  dlclose                                    oiT0vgzmW0M  libkernel_v0.1
  dlerror                                    ucFJiTO1EUw  libkernel_v0.1
  dlopen                                     UteVS6B1ZrU  libkernel_v0.1
  dlsym                                      biY+kcVB5D4  libkernel_v0.1
  dup2                                       wdUufa9g-D8  libkernel_v0.1
  fchmod                                     n01yNbQO5W4  libkernel_v0.1
  futimes                                    +0EDo7YzcoU  libkernel_v0.1
  getcwd                                     DYivN1nO-JQ  LibcInternal_v0.1
  getdents                                   2G6i6hMIUUY  libkernel_v0.1
  getegid                                    72rYuYoDTWk  libkernel_v0.1
  getenv                                     smbQukfxYJM  LibcInternal_v0.1
  geteuid                                    tvpHe5kBO4E  libkernel_v0.1
  getgid                                     AfuS23bX6kg  libkernel_v0.1
  gethostname                                -nvxBWa0iDs  LibcInternal_v0.1
  getlogin_r                                 78FiHequa9U  libkernel_v0.1
  getrlimit                                  Wh7HbV7JFqc  libkernel_v0.1
  getuid                                     kg4x8Prhfxw  libkernel_v0.1
  ioctl                                      PfccT7qURYE  libkernel_v0.1
  link                                       Pd7KtJ1gybk  libkernel_sys_v0.1
  lstat                                      DRGXpDDh8Ng  libkernel_v0.1
  mmap                                       BPE9s9vQQXo  libkernel_v0.1
  pathconf                                   oc98+zOImus  libkernel_sys_v0.1
  pipe                                       -Jp7F+pXxNg  libkernel_v0.1
  poll                                       ku7D4q1Y9PI  libkernel_v0.1
  pthread_attr_getinheritsched               oLjPqUKhzes  libkernel_v0.1
  pthread_attr_getscope                      e2G+cdEkOmU  libkernel_v0.1
  pthread_attr_getstackaddr                  DxmIMUQ-wXY  libkernel_v0.1
  pthread_attr_setscope                      xesmlSI-KCI  libkernel_v0.1
  pthread_barrier_destroy                    +Pqub9HZCPo  libkernel_v0.1
  pthread_barrier_init                       ZsXLFtd2jqQ  libkernel_v0.1
  pthread_barrier_wait                       CawZgCYqXWk  libkernel_v0.1
  pthread_getcpuclockid                      nnoxZUHK+SA  libkernel_v0.1
  pthread_set_name_np                        oxMp8uPqa+U  libkernel_v0.1
  pthread_sigmask                            JZKw5+Wrnaw  libkernel_v0.1
  readlink                                   pd02UI9TbOA  libkernel_sys_v0.1
  readv                                      I7ImcLds-uU  libkernel_v0.1
  realpath                                   vhtcIgZG-Lk  LibcInternal_v0.1
  rename                                     NN01qLRhiqU  libkernel_v0.1
  rmdir                                      c7ZnT7V1B98  libkernel_v0.1
  sceAgcInit                                 kW3GLb7QfPg  Agc_v0.1
  sceHttp2AbortRequest                       IZ-qjhRqvjk  Http2_v0.1
  sceKernelSendNotificationRequest           zl7hupSO0C0  libkernel_v0.1
  sceUserServiceGetForegroundUser            eNb53LQJmIM  UserService_v0.1
  shm_open                                   QuJYZ2KVGGQ  libkernel_v0.1
  sigaction                                  KiJEPEWRyUY  libkernel_v0.1
  sigaltstack                                sHziAegVp74  libkernel_v0.1
  sigdelset                                  Nd-u09VFSCA  libkernel_v0.1
  sigemptyset                                +F7C-hdk7+E  libkernel_v0.1
  sigfillset                                 VkTAsrZDcJ0  libkernel_v0.1
  signal                                     VADc3MNQ3cM  libkernel_v0.1
  sleep                                      0wu33hunNdE  libkernel_v0.1
  srandom                                    sPC7XE6hfFY  LibcInternal_v0.1
  symlink                                    waIF+5fE5HQ  libkernel_sys_v0.1
  sysconf                                    mkawd0NA9ts  libkernel_v0.1
  sysctl                                     DFmMT80xcNI  libkernel_v0.1
  syslog                                     UNS2V4S097M  LibcInternal_v0.1
  system                                     Jc6E7N+dHz0  libkernel_v0.1
  truncate                                   ayrtszI7GBg  libkernel_v0.1
  unsetenv                                   CRJcH8CnPSI  LibcInternal_v0.1
  utime                                      1nTKA7pN1jw  LibcInternal_v0.1
  utimes                                     GDuV00CHrUg  libkernel_v0.1
  writev                                     Z2aKdxzS4KE  libkernel_v0.1

SwanStation PS5 (PPSA98510) — 87 imports:

  _Unwind_Backtrace                          s62MgBhosjU  LibcInternal_v0.1
  __inet_ntop                                4pYihoPggn8  libkernel_v0.1
  __inet_pton                                fyPeCKJ94Hg  libkernel_v0.1
  _fstatfs                                   17Mfe1B3X6U  libkernel_v0.1
  access                                     8vE6Z6VEYyk  libkernel_v0.1
  basename                                   rg5JEBlKCuo  LibcInternal_v0.1
  closedir                                   XepdqehVYe4  LibcInternal_v0.1
  dlclose                                    oiT0vgzmW0M  libkernel_v0.1
  dlerror                                    ucFJiTO1EUw  libkernel_v0.1
  dlopen                                     UteVS6B1ZrU  libkernel_v0.1
  dlsym                                      biY+kcVB5D4  libkernel_v0.1
  dup2                                       wdUufa9g-D8  libkernel_v0.1
  fchmod                                     n01yNbQO5W4  libkernel_v0.1
  freeifaddrs                                N2OjwJJGjeQ  LibcInternal_v0.1
  futimes                                    +0EDo7YzcoU  libkernel_v0.1
  getcontext                                 dar03AOn+nM  libkernel_v0.1
  getcwd                                     DYivN1nO-JQ  LibcInternal_v0.1
  getdents                                   2G6i6hMIUUY  libkernel_v0.1
  getegid                                    72rYuYoDTWk  libkernel_v0.1
  getenv                                     smbQukfxYJM  LibcInternal_v0.1
  geteuid                                    tvpHe5kBO4E  libkernel_v0.1
  getgid                                     AfuS23bX6kg  libkernel_v0.1
  gethostname                                -nvxBWa0iDs  LibcInternal_v0.1
  getifaddrs                                 j-gWL6wDros  LibcInternal_v0.1
  getpeername                                TXFFFiNldU8  libkernel_v0.1
  getrlimit                                  Wh7HbV7JFqc  libkernel_v0.1
  getuid                                     kg4x8Prhfxw  libkernel_v0.1
  ioctl                                      PfccT7qURYE  libkernel_v0.1
  issetugid                                  AxUhC3zNrhk  libkernel_v0.1
  lstat                                      DRGXpDDh8Ng  libkernel_v0.1
  madvise                                    Jahsnh4KKkg  libkernel_v0.1
  makecontext                                GipcbdDM5cI  LibcInternal_v0.1
  memrchr                                    5G2ONUzRgjY  LibcInternal_v0.1
  mlock                                      mTBZfEal2Bw  libkernel_v0.1
  mmap                                       BPE9s9vQQXo  libkernel_v0.1
  msync                                      tZY4+SZNFhA  libkernel_v0.1
  opendir                                    ay3uROQAc5A  LibcInternal_v0.1
  pipe                                       -Jp7F+pXxNg  libkernel_v0.1
  poll                                       ku7D4q1Y9PI  libkernel_v0.1
  pthread_attr_getinheritsched               oLjPqUKhzes  libkernel_v0.1
  pthread_attr_getscope                      e2G+cdEkOmU  libkernel_v0.1
  pthread_attr_getstackaddr                  DxmIMUQ-wXY  libkernel_v0.1
  pthread_attr_setscope                      xesmlSI-KCI  libkernel_v0.1
  pthread_barrier_destroy                    +Pqub9HZCPo  libkernel_v0.1
  pthread_barrier_init                       ZsXLFtd2jqQ  libkernel_v0.1
  pthread_barrier_wait                       CawZgCYqXWk  libkernel_v0.1
  pthread_cancel                             0D4-FVvEikw  libkernel_v0.1
  pthread_getcpuclockid                      nnoxZUHK+SA  libkernel_v0.1
  pthread_set_name_np                        oxMp8uPqa+U  libkernel_v0.1
  pthread_setcanceltype                      2dEhvvjlq30  libkernel_v0.1
  pthread_sigmask                            JZKw5+Wrnaw  libkernel_v0.1
  raise                                      0t0-MxQNwK4  libkernel_v0.1
  readdir                                    lybyyKtP54c  LibcInternal_v0.1
  readlink                                   pd02UI9TbOA  libkernel_sys_v0.1
  readv                                      I7ImcLds-uU  libkernel_v0.1
  reallocf                                   YMZO9ChZb0E  LibcInternal_v0.1
  realpath                                   vhtcIgZG-Lk  LibcInternal_v0.1
  rename                                     NN01qLRhiqU  libkernel_v0.1
  rewinddir                                  kCKHi6JYtmM  LibcInternal_v0.1
  rmdir                                      c7ZnT7V1B98  libkernel_v0.1
  sceAgcInit                                 kW3GLb7QfPg  Agc_v0.1
  sceKernelDebugOutText                      9JYNqN6jAKI  libkernel_v0.1
  sceKernelGetFsSandboxRandomWord            JGfTMBOdUJo  libkernel_v0.1
  sceKernelSendNotificationRequest           zl7hupSO0C0  libkernel_v0.1
  sceSystemServiceLaunchWebBrowser           -+3hY+y8bNo  SystemService_v0.1
  sceUserServiceGetForegroundUser            eNb53LQJmIM  UserService_v0.1
  setcontext                                 2VRU7xiqLO8  libkernel_v0.1
  seteuid                                    HTxb6gmexa0  libkernel_v0.1
  shm_open                                   QuJYZ2KVGGQ  libkernel_v0.1
  sigaction                                  KiJEPEWRyUY  libkernel_v0.1
  sigaddset                                  JUimFtKe0Kc  libkernel_v0.1
  sigdelset                                  Nd-u09VFSCA  libkernel_v0.1
  sigemptyset                                +F7C-hdk7+E  libkernel_v0.1
  sigfillset                                 VkTAsrZDcJ0  libkernel_v0.1
  signal                                     VADc3MNQ3cM  libkernel_v0.1
  socketpair                                 MZb0GKT3mo8  libkernel_v0.1
  sysconf                                    mkawd0NA9ts  libkernel_v0.1
  sysctl                                     DFmMT80xcNI  libkernel_v0.1
  sysctlbyname                               MhC53TKmjVA  libkernel_v0.1
  syslog                                     UNS2V4S097M  LibcInternal_v0.1
  system                                     Jc6E7N+dHz0  libkernel_v0.1
  tcgetattr                                  5kBfZ40bAuk  libkernel_v0.1
  tcsetattr                                  La7xW-jcZwQ  libkernel_v0.1
  unsetenv                                   CRJcH8CnPSI  LibcInternal_v0.1
  utime                                      1nTKA7pN1jw  LibcInternal_v0.1
  utimes                                     GDuV00CHrUg  libkernel_v0.1
  writev                                     Z2aKdxzS4KE  libkernel_v0.1
**@⁠lslogis** on GitHub · 2026-10-30 11:34 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2000) ## Summary Three homebrew titles fail to boot for the same linker-level reason. Every import KytyPS5 cannot resolve is tagged `<lib>_v0.1`; every import it does resolve is tagged `<lib>_v1.1`. The two sets do not intersect at all, and no `*_v0.1` import resolves in any of the three runs. The NID to implementation table appears to have no SYS_V0 (legacy ABI) entries, so anything built against the SDK's `v0.1` stub library cannot boot. This is a class-wide gap, not a per-title one. All 105 unresolved NIDs are ordinary, documented symbols. I decoded them by reverse-running the PS5 NID hash (`sha1(symbol + SUFFIX)`, first 8 bytes reversed, custom alphabet, 11 output characters) against `zecoxao/sce_symbols/aerolib.csv` (159,034 entries). The hash reproduces that table 400/400, so the names below are exact rather than inferred. ## Environment - **Build:** `KytyPS5-2026-10-30-4919fdb` (official Windows release, `kyty_emulator.exe`; archive SHA-256 `8dc6eb912df9c3083ce1bfa6f6e01f8f5d0442c904cf4bec2ac4e3537ec3954f`) - **Host:** Windows 11 10.0.26200 x64, AMD Ryzen 9 9950X3D, NVIDIA GeForce RTX 5080 - **Launch:** `kyty_emulator --game <directory containing eboot.bin>` - **Inputs:** three unsigned homebrew titles, no commercial content | Title | ID | `eboot.bin` | SHA-256 | Outcome | |---|---|---|---|---| | Snes9x PS5 v2.9 | PPSA99922 | 8,785,634 B | `aa2ef3ef6d0962723b3a22eff8e1c13d0daaa75433df194e86d09ff6f74a99d1` | host exception `0xC000001D` at `eboot+0x1c9`, 0 stub calls | | Genesis Plus GX PS5 v2.2.1 | PPSA99921 | 61,561,349 B | `bdd8d8a583334b255500c68f69f0f79d370daad03fdfa6139de4f8f230547904` | `Guest abort()` at `libC.cpp:250` | | SwanStation PS5 | PPSA98510 | 47,115,527 B | `27b69b905892829c01faea526ff4cb1f45b6cf7e230dc4cccb98b40a4985d8ca` | `Guest abort()` at `libC.cpp:250` | ## 1. Unresolved imports are all `v0.1`; resolved imports are all `v1.1` Counting `Relocate: unresolved … import patched to stub` lines, split by image and by the version tag the linker prints: | Title | `eboot.bin` unresolved | tag | `sce_module/libc.prx` unresolved | tag | |---|---|---|---|---| | Snes9x PS5 v2.9 | 34 | all `*_v0.1` | 7 | all `*_v1.1` | | Genesis Plus GX PS5 v2.2.1 | 66 | all `*_v0.1` | 7 | all `*_v1.1` | | SwanStation PS5 | 87 | all `*_v0.1` | 7 | all `*_v1.1` | A typical line: ``` Relocate: unresolved non-PLT import patched to stub [11250] [00000009007fec50] <- 0000000200000000, smbQukfxYJM[LibcInternal_v1][LibcInternal_v0.1][Func], Func, Global, ./snes9x/PPSA99922\eboot.bin ``` On the resolved side, every hit goes through `PS5 NID fallback:` with a `*_v1.1` tag. `libc_v1.1` alone accounts for 395 / 157 / 184 fallback resolutions in the three logs. Intersecting the two sets across all three runs gives **zero** NIDs that appear both resolved and unresolved, and zero `*_v0.1` tags in the fallback histogram. The resolver is not intermittently missing symbols; it has no entries for this ABI version at all. Decoded, the unresolved set is unremarkable. These 21 symbols are missing from all three `eboot.bin` files: ``` __inet_ntop 4pYihoPggn8 libkernel_v0.1 __inet_pton fyPeCKJ94Hg libkernel_v0.1 dup2 wdUufa9g-D8 libkernel_v0.1 getenv smbQukfxYJM LibcInternal_v0.1 getgid AfuS23bX6kg libkernel_v0.1 gethostname -nvxBWa0iDs LibcInternal_v0.1 getuid kg4x8Prhfxw libkernel_v0.1 ioctl PfccT7qURYE libkernel_v0.1 lstat DRGXpDDh8Ng libkernel_v0.1 poll ku7D4q1Y9PI libkernel_v0.1 readv I7ImcLds-uU libkernel_v0.1 realpath vhtcIgZG-Lk LibcInternal_v0.1 rename NN01qLRhiqU libkernel_v0.1 sceKernelSendNotificationRequest zl7hupSO0C0 libkernel_v0.1 sceUserServiceGetForegroundUser eNb53LQJmIM UserService_v0.1 sigaction KiJEPEWRyUY libkernel_v0.1 sigemptyset +F7C-hdk7+E libkernel_v0.1 signal VADc3MNQ3cM libkernel_v0.1 sysconf mkawd0NA9ts libkernel_v0.1 sysctl DFmMT80xcNI libkernel_v0.1 writev Z2aKdxzS4KE libkernel_v0.1 ``` Across all three titles there are 99 distinct `v0.1` symbols in `eboot.bin`. They are POSIX and libc entry points (`opendir`, `dlopen`/`dlsym`, `mmap`, `pthread_barrier_*`, `socketpair`, `sigaltstack`, `sysctlbyname`) plus two `sce*` calls. Nothing here is proprietary or obscure. ## 2. `getenv` is what actually kills two of them The unresolved stubs are not merely logged; the ones that execute decide the failure. Both surviving titles die in the same place: - **Genesis Plus GX** — 30 `Unresolved import stub called` events over 6 distinct symbols (`getenv` x20, `sigaction` x6, then `pthread_attr_getstackaddr`, `signal`, `sigaltstack`, `sigemptyset`). The final 12 events, immediately before `Guest abort()`, are all `smbQukfxYJM` = **`getenv`**, from one call site (`patch_vaddr=0x0000000903628ee0`, `jmprela_index=180688`). - **SwanStation** — 75 events over 8 distinct symbols (`getenv` x65, `opendir` x3, `sigaction` x2, then `access`, `fchmod`, `geteuid` and two others). The final 14 are again `getenv`, and all 65 `getenv` hits come from a single site (`patch_vaddr=0x0000000902ab86d8`, `jmprela_index=64628`). In both cases the abort backtrace's failing frame prints `%s: %d: out of memory.` The guest calls `getenv` in a loop, receives the stub's `NULL`, and the allocation path gives up. A single alias for `getenv` would move both titles past their current stop point. ``` Unresolved import stub called [29]: patch_vaddr=0x0000000903628ee0 jmprela_index=180688 symbol=smbQukfxYJM[LibcInternal_v1][LibcInternal_v0.1][Func] type=Func bind=Global program=./gx/PPSA99921\eboot.bin --- Error --- Guest abort() in D:\a\KytyPS5\KytyPS5\src\libs\libC.cpp:250 ``` ## 3. Snes9x stops earlier, and for a different reason Snes9x logs 0 stub calls, against 30 and 75 for the other two. It faults inside CRT startup, before `main()`: ``` --- Execute: Main --- stack_addr = 7efdf3ee0 argc = 1 argv = 0x00000007efdf3ee8 envp = 0x00000007efdf3ef8 argv[0] = --- Guest fault context --- Unhandled host exception: type=2 code=3221225501 pc=0x00000009000001c9 access=0 address=0x0000000000000000 in D:\a\KytyPS5\KytyPS5\src\loader\runtimeLinker.cpp:721 ``` `code=3221225501` is `0xC000001D` (illegal instruction). The `eboot.bin` base is `0x900000000`, so `pc` is `eboot+0x1c9`, and the fault context shows that address holds `0f 0b`, a `ud2`. This is the guest's own assertion trap, not a stray pointer. The dump window is `pc-48 .. pc+48`, with the fault at byte 48: ``` 83 d7 00 ff 15 3e e7 7f 00 48 85 c0 74 02 5d c3 \ 0f 0b 0f 0b cc cc cc 55 48 89 e5 48 83 ff 01 48 | repeating wrappers 83 d7 00 ff 15 1e e7 7f 00 48 85 c0 74 02 5d c3 / 0f 0b 0f 0b cc cc cc 48 83 ff 01 48 83 d7 00 ff <- byte 48 = 0f 0b (ud2) = pc ``` Decoding the wrapper that ends at the fault: ``` eboot+0x1b0 55 push rbp eboot+0x1b1 48 89 e5 mov rbp, rsp eboot+0x1b4 48 83 ff 01 cmp rdi, 1 eboot+0x1b8 48 83 d7 00 or rdi, 0 eboot+0x1bc ff 15 1e e7 7f 00 call qword [rip+0x7fe71e] -> guest GOT 0x9007fe8e0 eboot+0x1c2 48 85 c0 test rax, rax eboot+0x1c5 74 02 je +2 ; rax == 0 -> jump to ud2 eboot+0x1c7 5d / c3 pop rbp / ret eboot+0x1c9 0f 0b ud2 <- fault, and rax = 0 in the dump ``` Four back-to-back wrappers over `eboot+0x19c..0x1e8`, in both `call [rip+…]` and `jmp [rip+…]` form (displacements `0x7fe73e`, `0x7fe71e`, `0x7fe702`, `0x7fe6f2`), all target the **same** GOT slot `0x9007fe8e0`. That slot sits below the unresolved-stub patch region, which begins at `0x9007fec50`, and the address never appears in the log. So this import was bound, and the bound implementation returned `NULL`, which the guest's own `NULL` check converted into a trap. I could not name that symbol. It is absent from the log, and `eboot.bin` is a Prospero SELF (magic `4f 15 3d 1d`), so the relocation table is not readable without unpacking it first. The observable facts are the shared slot, the `NULL` return, and the trap. ## 4. The 7 `libc.prx` stubs are a separate, smaller gap These are the only unresolved imports tagged `*_v1.1`, and they are identical in all three runs because they come from the same SDK `libc.prx` (SHA-256 `e6ff45d16adf687855cc3b33b0c8a4132b6504360b221e0a34c7e99fb3ba0036`): ``` getrusage hHlZQUnlxSM libkernel_v1.1 rmdir c7ZnT7V1B98 libkernel_v1.1 sceKernelChmod fgIsQ10xYVA libkernel_v1.1 sceKernelInternalMemoryGetModuleSegmentInfo -YTW+qXc3CQ libkernel_v1.1 sceKernelMlock 3k6kx-zOOSQ libkernel_v1.1 sceKernelUtimes 0Cq8ipKr9n0 libkernel_v1.1 sceLibcInternalBacktraceForGame EHsF2i9FXPM LibcInternal_v1.1 ``` Closing the `v0.1` gap would leave these seven in place. ## Suggested fix The `v0.1` symbols are the same libc and libkernel functions KytyPS5 already implements under `v1.1`. The cheapest change is an alias in the NID table: when an import arrives as `<lib>_v1` with a `*_v0.1` version tag, fall back to the existing `*_v1.1` implementation instead of patching a stub. That is 21 aliases to cover all three `eboot.bin` files in this report, and 99 to cover them individually. `getenv` alone accounts for 20 of 30 executed stub hits in Genesis Plus GX and 65 of 75 in SwanStation, so it is the highest-value single entry. Happy to supply the full logs, the decoded per-title symbol tables, and the NID decoding script. ## Appendix: full unresolved tables <details> <summary>per-title `eboot.bin` unresolved imports, named</summary> **Snes9x PS5 v2.9** (PPSA99922) — 34 imports: ``` __inet_aton a7ToDPsIQrc LibcInternal_v0.1 __inet_ntop 4pYihoPggn8 libkernel_v0.1 __inet_pton fyPeCKJ94Hg libkernel_v0.1 access 8vE6Z6VEYyk libkernel_v0.1 closedir XepdqehVYe4 LibcInternal_v0.1 dup2 wdUufa9g-D8 libkernel_v0.1 freeifaddrs N2OjwJJGjeQ LibcInternal_v0.1 getenv smbQukfxYJM LibcInternal_v0.1 getgid AfuS23bX6kg libkernel_v0.1 gethostname -nvxBWa0iDs LibcInternal_v0.1 getifaddrs j-gWL6wDros LibcInternal_v0.1 getlogin_r 78FiHequa9U libkernel_v0.1 getuid kg4x8Prhfxw libkernel_v0.1 ioctl PfccT7qURYE libkernel_v0.1 lstat DRGXpDDh8Ng libkernel_v0.1 opendir ay3uROQAc5A LibcInternal_v0.1 poll ku7D4q1Y9PI libkernel_v0.1 readdir lybyyKtP54c LibcInternal_v0.1 readv I7ImcLds-uU libkernel_v0.1 realpath vhtcIgZG-Lk LibcInternal_v0.1 rename NN01qLRhiqU libkernel_v0.1 sceHttp2AbortRequest IZ-qjhRqvjk Http2_v0.1 sceKernelSendNotificationRequest zl7hupSO0C0 libkernel_v0.1 sceNetResolverStartAton Apb4YDxKsRI Net_v0.1 sceUserServiceGetForegroundUser eNb53LQJmIM UserService_v0.1 sigaction KiJEPEWRyUY libkernel_v0.1 sigaltstack sHziAegVp74 libkernel_v0.1 sigemptyset +F7C-hdk7+E libkernel_v0.1 signal VADc3MNQ3cM libkernel_v0.1 sleep 0wu33hunNdE libkernel_v0.1 srandom sPC7XE6hfFY LibcInternal_v0.1 sysconf mkawd0NA9ts libkernel_v0.1 sysctl DFmMT80xcNI libkernel_v0.1 writev Z2aKdxzS4KE libkernel_v0.1 ``` **Genesis Plus GX PS5 v2.2.1** (PPSA99921) — 66 imports: ``` _Unwind_Backtrace s62MgBhosjU LibcInternal_v0.1 __inet_ntop 4pYihoPggn8 libkernel_v0.1 __inet_pton fyPeCKJ94Hg libkernel_v0.1 chdir 6mMQ1MSPW-Q libkernel_v0.1 dlclose oiT0vgzmW0M libkernel_v0.1 dlerror ucFJiTO1EUw libkernel_v0.1 dlopen UteVS6B1ZrU libkernel_v0.1 dlsym biY+kcVB5D4 libkernel_v0.1 dup2 wdUufa9g-D8 libkernel_v0.1 fchmod n01yNbQO5W4 libkernel_v0.1 futimes +0EDo7YzcoU libkernel_v0.1 getcwd DYivN1nO-JQ LibcInternal_v0.1 getdents 2G6i6hMIUUY libkernel_v0.1 getegid 72rYuYoDTWk libkernel_v0.1 getenv smbQukfxYJM LibcInternal_v0.1 geteuid tvpHe5kBO4E libkernel_v0.1 getgid AfuS23bX6kg libkernel_v0.1 gethostname -nvxBWa0iDs LibcInternal_v0.1 getlogin_r 78FiHequa9U libkernel_v0.1 getrlimit Wh7HbV7JFqc libkernel_v0.1 getuid kg4x8Prhfxw libkernel_v0.1 ioctl PfccT7qURYE libkernel_v0.1 link Pd7KtJ1gybk libkernel_sys_v0.1 lstat DRGXpDDh8Ng libkernel_v0.1 mmap BPE9s9vQQXo libkernel_v0.1 pathconf oc98+zOImus libkernel_sys_v0.1 pipe -Jp7F+pXxNg libkernel_v0.1 poll ku7D4q1Y9PI libkernel_v0.1 pthread_attr_getinheritsched oLjPqUKhzes libkernel_v0.1 pthread_attr_getscope e2G+cdEkOmU libkernel_v0.1 pthread_attr_getstackaddr DxmIMUQ-wXY libkernel_v0.1 pthread_attr_setscope xesmlSI-KCI libkernel_v0.1 pthread_barrier_destroy +Pqub9HZCPo libkernel_v0.1 pthread_barrier_init ZsXLFtd2jqQ libkernel_v0.1 pthread_barrier_wait CawZgCYqXWk libkernel_v0.1 pthread_getcpuclockid nnoxZUHK+SA libkernel_v0.1 pthread_set_name_np oxMp8uPqa+U libkernel_v0.1 pthread_sigmask JZKw5+Wrnaw libkernel_v0.1 readlink pd02UI9TbOA libkernel_sys_v0.1 readv I7ImcLds-uU libkernel_v0.1 realpath vhtcIgZG-Lk LibcInternal_v0.1 rename NN01qLRhiqU libkernel_v0.1 rmdir c7ZnT7V1B98 libkernel_v0.1 sceAgcInit kW3GLb7QfPg Agc_v0.1 sceHttp2AbortRequest IZ-qjhRqvjk Http2_v0.1 sceKernelSendNotificationRequest zl7hupSO0C0 libkernel_v0.1 sceUserServiceGetForegroundUser eNb53LQJmIM UserService_v0.1 shm_open QuJYZ2KVGGQ libkernel_v0.1 sigaction KiJEPEWRyUY libkernel_v0.1 sigaltstack sHziAegVp74 libkernel_v0.1 sigdelset Nd-u09VFSCA libkernel_v0.1 sigemptyset +F7C-hdk7+E libkernel_v0.1 sigfillset VkTAsrZDcJ0 libkernel_v0.1 signal VADc3MNQ3cM libkernel_v0.1 sleep 0wu33hunNdE libkernel_v0.1 srandom sPC7XE6hfFY LibcInternal_v0.1 symlink waIF+5fE5HQ libkernel_sys_v0.1 sysconf mkawd0NA9ts libkernel_v0.1 sysctl DFmMT80xcNI libkernel_v0.1 syslog UNS2V4S097M LibcInternal_v0.1 system Jc6E7N+dHz0 libkernel_v0.1 truncate ayrtszI7GBg libkernel_v0.1 unsetenv CRJcH8CnPSI LibcInternal_v0.1 utime 1nTKA7pN1jw LibcInternal_v0.1 utimes GDuV00CHrUg libkernel_v0.1 writev Z2aKdxzS4KE libkernel_v0.1 ``` **SwanStation PS5** (PPSA98510) — 87 imports: ``` _Unwind_Backtrace s62MgBhosjU LibcInternal_v0.1 __inet_ntop 4pYihoPggn8 libkernel_v0.1 __inet_pton fyPeCKJ94Hg libkernel_v0.1 _fstatfs 17Mfe1B3X6U libkernel_v0.1 access 8vE6Z6VEYyk libkernel_v0.1 basename rg5JEBlKCuo LibcInternal_v0.1 closedir XepdqehVYe4 LibcInternal_v0.1 dlclose oiT0vgzmW0M libkernel_v0.1 dlerror ucFJiTO1EUw libkernel_v0.1 dlopen UteVS6B1ZrU libkernel_v0.1 dlsym biY+kcVB5D4 libkernel_v0.1 dup2 wdUufa9g-D8 libkernel_v0.1 fchmod n01yNbQO5W4 libkernel_v0.1 freeifaddrs N2OjwJJGjeQ LibcInternal_v0.1 futimes +0EDo7YzcoU libkernel_v0.1 getcontext dar03AOn+nM libkernel_v0.1 getcwd DYivN1nO-JQ LibcInternal_v0.1 getdents 2G6i6hMIUUY libkernel_v0.1 getegid 72rYuYoDTWk libkernel_v0.1 getenv smbQukfxYJM LibcInternal_v0.1 geteuid tvpHe5kBO4E libkernel_v0.1 getgid AfuS23bX6kg libkernel_v0.1 gethostname -nvxBWa0iDs LibcInternal_v0.1 getifaddrs j-gWL6wDros LibcInternal_v0.1 getpeername TXFFFiNldU8 libkernel_v0.1 getrlimit Wh7HbV7JFqc libkernel_v0.1 getuid kg4x8Prhfxw libkernel_v0.1 ioctl PfccT7qURYE libkernel_v0.1 issetugid AxUhC3zNrhk libkernel_v0.1 lstat DRGXpDDh8Ng libkernel_v0.1 madvise Jahsnh4KKkg libkernel_v0.1 makecontext GipcbdDM5cI LibcInternal_v0.1 memrchr 5G2ONUzRgjY LibcInternal_v0.1 mlock mTBZfEal2Bw libkernel_v0.1 mmap BPE9s9vQQXo libkernel_v0.1 msync tZY4+SZNFhA libkernel_v0.1 opendir ay3uROQAc5A LibcInternal_v0.1 pipe -Jp7F+pXxNg libkernel_v0.1 poll ku7D4q1Y9PI libkernel_v0.1 pthread_attr_getinheritsched oLjPqUKhzes libkernel_v0.1 pthread_attr_getscope e2G+cdEkOmU libkernel_v0.1 pthread_attr_getstackaddr DxmIMUQ-wXY libkernel_v0.1 pthread_attr_setscope xesmlSI-KCI libkernel_v0.1 pthread_barrier_destroy +Pqub9HZCPo libkernel_v0.1 pthread_barrier_init ZsXLFtd2jqQ libkernel_v0.1 pthread_barrier_wait CawZgCYqXWk libkernel_v0.1 pthread_cancel 0D4-FVvEikw libkernel_v0.1 pthread_getcpuclockid nnoxZUHK+SA libkernel_v0.1 pthread_set_name_np oxMp8uPqa+U libkernel_v0.1 pthread_setcanceltype 2dEhvvjlq30 libkernel_v0.1 pthread_sigmask JZKw5+Wrnaw libkernel_v0.1 raise 0t0-MxQNwK4 libkernel_v0.1 readdir lybyyKtP54c LibcInternal_v0.1 readlink pd02UI9TbOA libkernel_sys_v0.1 readv I7ImcLds-uU libkernel_v0.1 reallocf YMZO9ChZb0E LibcInternal_v0.1 realpath vhtcIgZG-Lk LibcInternal_v0.1 rename NN01qLRhiqU libkernel_v0.1 rewinddir kCKHi6JYtmM LibcInternal_v0.1 rmdir c7ZnT7V1B98 libkernel_v0.1 sceAgcInit kW3GLb7QfPg Agc_v0.1 sceKernelDebugOutText 9JYNqN6jAKI libkernel_v0.1 sceKernelGetFsSandboxRandomWord JGfTMBOdUJo libkernel_v0.1 sceKernelSendNotificationRequest zl7hupSO0C0 libkernel_v0.1 sceSystemServiceLaunchWebBrowser -+3hY+y8bNo SystemService_v0.1 sceUserServiceGetForegroundUser eNb53LQJmIM UserService_v0.1 setcontext 2VRU7xiqLO8 libkernel_v0.1 seteuid HTxb6gmexa0 libkernel_v0.1 shm_open QuJYZ2KVGGQ libkernel_v0.1 sigaction KiJEPEWRyUY libkernel_v0.1 sigaddset JUimFtKe0Kc libkernel_v0.1 sigdelset Nd-u09VFSCA libkernel_v0.1 sigemptyset +F7C-hdk7+E libkernel_v0.1 sigfillset VkTAsrZDcJ0 libkernel_v0.1 signal VADc3MNQ3cM libkernel_v0.1 socketpair MZb0GKT3mo8 libkernel_v0.1 sysconf mkawd0NA9ts libkernel_v0.1 sysctl DFmMT80xcNI libkernel_v0.1 sysctlbyname MhC53TKmjVA libkernel_v0.1 syslog UNS2V4S097M LibcInternal_v0.1 system Jc6E7N+dHz0 libkernel_v0.1 tcgetattr 5kBfZ40bAuk libkernel_v0.1 tcsetattr La7xW-jcZwQ libkernel_v0.1 unsetenv CRJcH8CnPSI LibcInternal_v0.1 utime 1nTKA7pN1jw LibcInternal_v0.1 utimes GDuV00CHrUg libkernel_v0.1 writev Z2aKdxzS4KE libkernel_v0.1 ``` </details>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:10:57 +00:00
Author
Owner

@⁠lslogis on GitHub · 2026-10-30 11:51 UTC · original

Correction: the root cause in this report is wrong

I wrote the analysis above, then read the linker. The mechanism I described is not what the code does, and the "Suggested fix" section is built on that mistake. The measurements still stand; the interpretation does not.

What the code actually does

RuntimeLinker::Resolve() (src/loader/runtimeLinker.cpp:1333) tries, in order:

  1. an exact (name, library, library_version, module, module_version) match via SymbolDatabase::Find;
  2. the same match against each loaded program's export_symbols;
  3. the fallback resolve_by_nid() (runtimeLinker.cpp:1351-1371) → SymbolDatabase::FindByNid() (src/loader/symbolDatabase.cpp:68-81);
  4. if all of that fails, vaddr = 0 and the import is patched to a stub.

Step 3 is the one my report was about, and it is already version-agnostic. It matches on name.starts_with(nid + "[") and name.ends_with("[Func]") only — neither the library name nor the version tag enters the comparison. A request tagged LibcInternal_v0.1 binds to an implementation registered under libc_v1.1 today, provided the NID exists. My proposal to add a *_v0.1 → *_v1.1 alias describes a gap that does not exist.

Why these imports actually fail

Implementations are registered by hardcoded NID string, for example LIB_FUNC("bzQExy189ZI", LibC::init_env) at src/libs/libC.cpp:815 — 51 entries in libC.cpp, 395 in libKernel.cpp.

I took all 105 unresolved NIDs from my three logs and searched every file in this repository: 681 files, all extensions, not just .cpp/.h. None of the 105 appear anywhere. They are not mismatched, they are unimplemented. Nothing loads a symbol map from disk either, so there is no data-driven registration I missed.

Two caveats on that scan: the 14 git submodules are not initialized in my checkout, and m_symbols also grows at runtime from the exports of loaded modules.

One column in my own table was self-referential

The report states that resolved imports are "100% *_v1.1". The PS5 NID fallback: line prints the found record's version tag, not the requesting tag — runtimeLinker.cpp:1410 logs out_info->name. So the fallback histogram measures how implementations are registered and carries no information about the versions that were requested. The "zero overlap" argument was built on that column, and it does not support the conclusion I drew from it.

What still stands

  • The counts: 41 / 73 / 94 unresolved imports, split into 34 / 66 / 87 in eboot.bin plus 7 in sce_module/libc.prx, with the libc.prx seven identical across all three titles because they share one SDK binary.
  • Every unresolved NID decodes to a documented symbol, and the decoding is exact rather than guessed (the hash reproduces aerolib.csv 400/400).
  • getenv (smbQukfxYJM) is genuinely what ends two of the three runs — 20 of 30 and 65 of 75 executed stub hits, and the final 12 and 14 before Guest abort(). That is a measurement, unaffected by the misread above.
  • The Snes9x ud2 analysis in section 3 is independent of all of this and unchanged.

Revised suggestion

Implement the symbols rather than aliasing them. The cheapest worthwhile one is getenv: LibC::init_env already captures the guest envp into g_envp (src/libs/libC.cpp:61, :260-284), so getenv is a scan of that array plus one LIB_FUNC("smbQukfxYJM", …) entry. setenv (src/libs/libC.cpp:310-326) is currently a return 0 with no store behind it, so the two want doing together.

Everything else on that list — opendir, ioctl, mmap, poll, dlopen/dlsym, pthread_barrier_*, socketpair — is actual guest OS work, not a table entry. Implementing getenv would move Genesis Plus GX and SwanStation to their next missing symbol and no further, so it should be judged as progress on the homebrew tier, not as a fix for it.

**@⁠lslogis** on GitHub · 2026-10-30 11:51 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2000#issuecomment-6521973934) ## Correction: the root cause in this report is wrong I wrote the analysis above, then read the linker. The mechanism I described is not what the code does, and the "Suggested fix" section is built on that mistake. The measurements still stand; the interpretation does not. ### What the code actually does `RuntimeLinker::Resolve()` (`src/loader/runtimeLinker.cpp:1333`) tries, in order: 1. an exact `(name, library, library_version, module, module_version)` match via `SymbolDatabase::Find`; 2. the same match against each loaded program's `export_symbols`; 3. the fallback `resolve_by_nid()` (`runtimeLinker.cpp:1351-1371`) → `SymbolDatabase::FindByNid()` (`src/loader/symbolDatabase.cpp:68-81`); 4. if all of that fails, `vaddr = 0` and the import is patched to a stub. Step 3 is the one my report was about, and **it is already version-agnostic**. It matches on `name.starts_with(nid + "[")` and `name.ends_with("[Func]")` only — neither the library name nor the version tag enters the comparison. A request tagged `LibcInternal_v0.1` binds to an implementation registered under `libc_v1.1` today, provided the NID exists. My proposal to add a `*_v0.1` → `*_v1.1` alias describes a gap that does not exist. ### Why these imports actually fail Implementations are registered by hardcoded NID string, for example `LIB_FUNC("bzQExy189ZI", LibC::init_env)` at `src/libs/libC.cpp:815` — 51 entries in `libC.cpp`, 395 in `libKernel.cpp`. I took all 105 unresolved NIDs from my three logs and searched every file in this repository: 681 files, all extensions, not just `.cpp`/`.h`. **None of the 105 appear anywhere.** They are not mismatched, they are unimplemented. Nothing loads a symbol map from disk either, so there is no data-driven registration I missed. Two caveats on that scan: the 14 git submodules are not initialized in my checkout, and `m_symbols` also grows at runtime from the exports of loaded modules. ### One column in my own table was self-referential The report states that resolved imports are "100% `*_v1.1`". The `PS5 NID fallback:` line prints the *found record's* version tag, not the *requesting* tag — `runtimeLinker.cpp:1410` logs `out_info->name`. So the fallback histogram measures how implementations are registered and carries no information about the versions that were requested. The "zero overlap" argument was built on that column, and it does not support the conclusion I drew from it. ### What still stands - The counts: 41 / 73 / 94 unresolved imports, split into 34 / 66 / 87 in `eboot.bin` plus 7 in `sce_module/libc.prx`, with the `libc.prx` seven identical across all three titles because they share one SDK binary. - Every unresolved NID decodes to a documented symbol, and the decoding is exact rather than guessed (the hash reproduces `aerolib.csv` 400/400). - `getenv` (`smbQukfxYJM`) is genuinely what ends two of the three runs — 20 of 30 and 65 of 75 executed stub hits, and the final 12 and 14 before `Guest abort()`. That is a measurement, unaffected by the misread above. - The Snes9x `ud2` analysis in section 3 is independent of all of this and unchanged. ### Revised suggestion Implement the symbols rather than aliasing them. The cheapest worthwhile one is `getenv`: `LibC::init_env` already captures the guest `envp` into `g_envp` (`src/libs/libC.cpp:61`, `:260-284`), so `getenv` is a scan of that array plus one `LIB_FUNC("smbQukfxYJM", …)` entry. `setenv` (`src/libs/libC.cpp:310-326`) is currently a `return 0` with no store behind it, so the two want doing together. Everything else on that list — `opendir`, `ioctl`, `mmap`, `poll`, `dlopen`/`dlsym`, `pthread_barrier_*`, `socketpair` — is actual guest OS work, not a table entry. Implementing `getenv` would move Genesis Plus GX and SwanStation to their next missing symbol and no further, so it should be judged as progress on the homebrew tier, not as a fix for it.
Author
Owner

@⁠bobrass on GitHub · 2026-10-30 11:54 UTC · original

I checked your correction against current main: FindByNid() is already version-agnostic, and setenv returns success without storing anything. I revised my local change so the guest gets a separate environment map seeded from envp, with getenv and setenv using that same map. I have not built it, so I can’t say whether it moves Genesis Plus GX or SwanStation past the current failure. The change is not on a public branch yet.

**@⁠bobrass** on GitHub · 2026-10-30 11:54 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2000#issuecomment-6522036502) I checked your correction against current main: `FindByNid()` is already version-agnostic, and `setenv` returns success without storing anything. I revised my local change so the guest gets a separate environment map seeded from `envp`, with `getenv` and `setenv` using that same map. I have not built it, so I can’t say whether it moves Genesis Plus GX or SwanStation past the current failure. The change is not on a public branch yet.
Author
Owner

@⁠bobrass on GitHub · 2026-10-30 22:44 UTC · original

Thanks for posting the correction and tracing the resolver. You’re right: the NID fallback already ignores the version tag, so adding a v0.1 alias would not fix the missing implementations.

I opened PR #2007 to implement guest getenv and make setenv update the guest environment rather than the emulator’s host environment. This covers those two functions only; it may let a title proceed to its next missing import, but it does not establish that the three titles will boot. I haven’t run tests, a build, or emulator/runtime validation yet.

**@⁠bobrass** on GitHub · 2026-10-30 22:44 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2000#issuecomment-6535078127) Thanks for posting the correction and tracing the resolver. You’re right: the NID fallback already ignores the version tag, so adding a v0.1 alias would not fix the missing implementations. I opened [PR #2007](https://git.gtahub.st/github/KytyPS5--KytyPS5/pulls/2007) to implement guest `getenv` and make `setenv` update the guest environment rather than the emulator’s host environment. This covers those two functions only; it may let a title proceed to its next missing import, but it does not establish that the three titles will boot. I haven’t run tests, a build, or emulator/runtime validation yet.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#2000
No description provided.