Relinker: weak undefined imports become required (STB_WEAK → STB_GLOBAL), so Porpoise stops at its weak chroot import #4497
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-12T13:37:36Z.
Porpoise (PPSA99764, catalog 3.0) imports three functions as weak undefined symbols (
STB_WEAK, binding 2, section index 0 ineboot.bin's.dynsym):AKknh8Cx-V8(chroot)gnyVA6Tj-ak(fchdir)NDcSfcYZRC8(malloc_usable_size)That is on purpose. Its source at v3.0 says:
put_root_backtests each pointer for null, then triessceKernelDlsym, then raw system calls. On a console without the export, the import binds to null and the title still loads.In the relinked
app.elf, all three areSTB_GLOBAL(binding 1), so a weak import is treated as required:pathconf) merged, Porpoise stops atundefined symbol: AKknh8Cx-V8 (chroot).ld.sobinds a missing weak reference to 0, but the relinker no longer marks it weak.FAIL: unresolved ELF import AKknh8Cx-V8 (chroot) from libkernel_sys.prx. PE imports have no weak form.fchdirandmalloc_usable_sizeare exported onmain, sochrootis the only one Porpoise hits today. Any title built the same way that weak-imports something AnyPS5 doesn't export will stop the same way.Possible directions:
STB_WEAKon the relinked ELF's undefined symbols.Exporting
chroot(a throwing stub afterfchdirin libkernel_sys, ready on a branch) would get Porpoise past this one import. It would not help other weak imports, and Porpoise doesn't need it to load.