Relinker rejects PS4 executables: SCE dynamic tables and data in the code segment (two ready branches) + remaining PS4 work #3093
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 Get-fix on 2026-10-10T22:00:12Z.
In #159 the question of running PS4 games was answered as "theoretical; no one has tried it yet". I tried it on two PS4 executables:
graphicssample.Current
mainrejects both in the relinker, before any library code runs. This issue covers two fixes that are ready as branches, and the remaining work for PS4 titles. The full write-up, with the answer to #159, is in #3094.1. DT_SCE_* table values are offsets into PT_SCE_DYNLIBDATA
PS4 executables give the DT_SCE_* values (STRTAB, SYMTAB, RELA, JMPREL and the others) as offsets into the PT_SCE_DYNLIBDATA segment. The relinker reads them as file offsets:
Dynamic string offset is outside DT_STRSZ (offset 0x4c207500)Symbol table entry out of bounds (offset 0x744ee8c60)Branch:
fix/relinker-sce-dynamic-tables, commit Get-fix/AnyPS5@5dbf89a57e. When PT_SCE_DYNLIBDATA is present, the DT_SCE_* values are read relative to it, and a value past the end of the file is rejected.The relinker has two other readers of these tables, the unused-filter=1 and unused-filter=2 readers. They still read them the old way; this is recorded in TechnicalDebt.
2. Read-only data after the code is decoded as code
The executable segment of a PS4 executable keeps read-only data after the code; Bloodborne has 37 MiB there. The syscall scan and the call-site resolution decode the whole segment and fail:
Unsupported 0F 79 opcode without SSE4A prefix (offset 0x2f6e3d9)For executables with PT_SCE_DYNLIBDATA, both scans now stop at the end of the PLT that follows the last function of the unwind table. The PLT is found by searching forward for its first entry. The search can't stop next to the last function, because code without unwind entries can sit in between; the OpenOrbis sample has 680 bytes of start-up code there. If the executable has PLT relocations and no PLT is found, the relinker fails instead of guessing.
Branch:
fix/relinker-scan-code-extent, commit Get-fix/AnyPS5@a21e8fe4c0.Checks
Both branches are rebased on
262c0316and merge with each other without conflicts.ctest (relinker-only build):
mainsce_code_extent)New tests: each fails on
mainwith the original error and passes with its fix.Mutation checks: each change below makes a test fail.
PS5 executables: ps5-doom, VLC and Jelly5 convert byte-identically with
main, branch 1, branch 2 and both merged. The new code only runs when PT_SCE_DYNLIBDATA is present.Repository checks:
check_conventions.py --base origin/mainandcheck_test_registration.pypass.Where the executables stop (relinker only,
--windows --windows-gui --skip-sce-module):mainDynamic string offset is outside DT_STRSZSymbol table entry out of boundsUnsupported 0F 79 opcode without SSE4A prefixRELATIVE relocation has a nonzero symbol indexCode analysis: overlapping instruction boundaries (offset 0x3457cf)Remaining work for PS4 titles
These come from an experimental run in which the OpenOrbis sample started, opened a window and presented correct frames. That code is not submitted; details are in #3094.
Relinker
/libexec/ld-elf.so.1.Loader
__erroris imported from libkernel but exported by libc.prx. libc.prx is only added when libSceLibcInternal.prx is needed, and this sample doesn't need it.sce_sys/param.sfo, notparam.jsonLibraries
sceVideoOutSetBufferAttributeandsceVideoOutRegisterBuffers, the PS4 names. They map onto the...2functions with pixel format((f & 0xFFFF0000) << 32) | ((f & 0xFFFF) << 16).sceVideoOutGetFlipStatuswrites the 0x80-byte PS5 struct, but the PS4 struct is 0x40 bytes. The extra bytes overwrote the PS4 caller's saved rbp. This needs a way to tell PS4 callers apart._readv,_writev,_fcntl,_ioctlGraphics
libSceGnmDriver: 50 of Bloodborne's imports, and the PS4 GPU path behind it. This is the large one.Side finding:
APS5_DUMP_FRAMESwrites nothing for linear display buffers, becauseVulkanDevice::PresentDisplayBufferreturns from the linear path before the dump code. This also affects PS5 titles.AI-assisted: yes (Claude Code). I ran every result above locally; no PS4 hardware was used.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:12:33Z.
#3142 fixes the code-scan extent for PS4 executables (syscall/call-site scans stop at the PLT); the DT_SCE_* table offsets (#3141) and the remaining PS4 work are still open.
Imported from boykopovar/AnyPS5. Originally posted by saxopa on 2026-10-12T01:13:57Z.
#4203 covers "R_X86_64_RELATIVE with symbol index 1": the pipeline, code analysis and strict filter accept a zero-value STT_SECTION symbol (create-fself adds one to every symbol index). The OpenOrbis graphics sample then converts to Linux; Windows and macOS stop at PT_SCE_RELRO (PLTGOT at 0x130000).
Imported from boykopovar/AnyPS5. Originally posted by saxopa on 2026-10-12T15:11:48Z.
#4542 covers "Load PT_SCE_RELRO and keep it writable while relocating": a PT_SCE_RELRO that no PT_LOAD covers is loaded as a read-write PT_LOAD. The OpenOrbis graphics sample then stops on Windows and macOS at code analysis (overlapping instruction boundaries, offset 0xde39f), and on Linux at the program header slot limit.
Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-14T18:38:36Z.
Update: the OpenOrbis PS4 samples start on Windows
Thanks to @saxopa (#4203, #4542), @SandstromPL (#5195), @MarcZX100 (#4930, and for carrying #3141 and #3142) and @veosett (#5138). With their work, current
mainconverts all 15 OpenOrbis toolchain samples. Five more changes let them start. Each is a pull request with one commit onmaine442f4c2e:__errorlives in libc.prx)sceVideoOutSetBufferAttributeandsceVideoOutRegisterBuffers; linear PS4 buffers may be 4 KiB aligned; a handle with PS4 buffers gets the PS4 flip status (64 bytes) and vblank status (32 bytes)_readv,_writev,_fcntl,_fstat,__sys_socketexsce_sys/param.sfois read whenparam.jsonis absent (title, title ID, download data size, user parameters), and/dataand/download0are mounted for it/libexec/ld-elf.so.1at the start of the text is skipped when no PT_INTERP names it (OpenOrbis modules)Samples
Windows 11, WinLibs GCC 15.2.
maine442f4c2ewith the five PRs and #5138 merged. Each sample is unmodified with its ownparam.sfo, converted with--windows --windows-guiand run for 12 s.OpenOrbis graphics sample | FPS: 2.02, draws the Mandelbrot set (on the CPU)main: Initializing controller, draws its squarelogo.pngmain: Testcase PASSmain: Hello world! Waiting 2 seconds!,main: Done.libExample.prxand calls it:test string: Hi I'm from the library! You passed: 13371338 | rv = 0x00000000ioctl: request 0x00005413 on a file is not implemented, fd=1; with #5569 it runs to its own report of the offline HTTP backend's error (details in #5564)libSceFreeTypeimports (FT_Init_FreeType,FT_New_Face,FT_Set_Pixel_Sizes,FT_Get_Char_Index,FT_Load_Glyph,FT_Render_Glyph)eglInitialize,glShaderBinary,scePigletSetConfigurationVSH, …)Why each change is needed
The same build with one change left out (measured on
main84b01f9cd):FAIL: unresolved ELF import 9BcDykPmo1I(__error)i6-sR91Wt-4andw3BY+tAEiQY(sceVideoOutSetBufferAttribute,sceVideoOutRegisterBuffers)YSHRBRLn2pI(_writev), and+WRlkKjZvag(_readv),t0fXUzq61Z4(_fcntl) orA0O5kF5x4LQ(_fstat, inlibExample.prx);__sys_socketexis imported bynetworkingwhat(): param.json not foundaftermain: Creating a scenelibExample.prx:FAIL: Forbidden syscall instruction at code offset 0xd016elibExample.prx: Unsupported symbol attributes:Checks
e442f4c2ewith the five PRs and #5138 merged: 1212/1212.video_out_flip_*modes, which ctest skips under the offscreen driver, pass in a window, including the newps4mode.e442f4c2e: relinker-only ctest 164/164 (#5990) and 165/165 (#5994); the tests for its area 23/23 (#5991), 6/6 (#5992) and 9/9 (#5993)._fcntlnarrowing its argument tointmainand with each relinker PR.check_conventions.pypasses for each PR, title and description included.Checklist
Relinker
main)Loader
param.sfo(#5993)Libraries
_readv,_writev,_fcntl,_fstat,__sys_socketex(#5992;_ioctlwas already inmain)libSceFreeType, 6 functions (5 samples). I am looking at this next.libSceGnmDriverSide finding: linear display buffers in
APS5_DUMP_FRAMES(#4930)AI-assisted: yes (Claude Code). I ran every build, test and sample above locally on Windows 11; no PS4 hardware was used.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by SuperCatElvis on 2026-10-15T03:32:13Z.
PS4 Until Dawn (
eboot.elfplus bundledlibc.prxandlibSceFios2.prx), on a checkout that includes #3141 and #3142. Checked against the remaining-work list:“inline jump tables causing overlapping instructions”: the same Code analysis: overlapping instruction boundaries error stops the --windows relink of the
ebootat offsets 0x37d73f, 0x3833fb, 0x76fdbc and 0x180d805, andlibSceFios2.prxat 0x3d1fe. The tables sit at the end of an unwind range or in the gap after it, anoreturncall falls through into one,leatargets point into them, and the data after the PLT (about 7.4 MiB of read-only data in the executable segment) is decoded as code. #3142 bounds the syscall and call-site scans at the PLT; the code collector (TLS/FS analysis) needs the same limit. A local change finds trailing relative jump tables in both the syscall scan and the code collector, and keeps them and the data after the PLT out of the control-flow pass. With it the eboot and both bundled modules relink without errors.“
R_X86_64_RELATIVEwith symbol index 1”:create-fselfoutput has an unnamedSTT_SECTIONsymbol at index 1, which the guest reader rejects, andlibc.prxhas a RELATIVE relocation at slot 0xbc880 against a defined function symbol whose value equals the addend, which the code collector rejects withinvalid relative relocation. Both are accepted locally.The EXE then starts and stops at load on
libSceDiscMap.prx, imported by the bundledlibSceFios2.prx(NIDs ioKMruft1ek, lbQKqsERhtE); there is nolibSceDiscMapin the tree.import_audit.pyon the executable’s registry: 748 imports, 512 implemented, 6 stubs, 230 absent, led bylibSceGnmDriver(57),libc(21),libSceNpWebApi(21),libSceRudp(14) andlibSceNpUtility(12). The title has not been run past the loader.AI-assisted: yes (Claude Code). I ran every build and relink above locally on Windows 11; I did not run the test suite, and no PS4 hardware was used.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-15T05:57:19Z.
@SuperCatElvis Thanks for the detailed run! Some pointers for current
main(d92a8dad3):PT_SCE_DYNLIBDATA, it trims the executable segment to the range from the end ofPT_INTERPto the end of the PLT (CodeInstructionCollector.cpp L96-L110). Your checkout mentions only #3141 and #3142. Could you re-run on currentmainand say which of 0x37d73f, 0x3833fb, 0x76fdbc, 0x180d805 and Fios2's 0x3d1fe still stop? The collector still has no jump-table handling, so the inline tables are probably still there.STT_SECTIONat index 1 in a module: #5138 (veosett) accepts it in the guest reader and is waiting for a real module. Your log line fromlibc.prxorlibSceFios2.prxwould help there.libc.prxslot 0xbc880): nothing onmainor in an open PR accepts it yet. Onmainthe first stop for it is the guest reader (RELATIVE relocation has a symbol), then the collector'sinvalid relative relocation.libSceDiscMap:lbQKqsERhtEissceDiscMapIsRequestOnHDD.ioKMruft1ekhas no known name; it is shadPS4'sFunc_8A828CAEE7EDD5E9. shadPS4 (shadps4-emu/shadPS4#2686) and fpPS4 returnSCE_DISC_MAP_ERROR_NO_BITMAP_INFO(0x81100004) from both and write nothing. Bloodborne's bundled Fios2 imports the same two.Do you plan to open PRs from your local changes? If you'd rather not for the RELATIVE case or
libSceDiscMap, I'd be glad to take those, with the relocation stacked on #5138. For that it would help to have:st_info,st_shndx,st_value);libc.prx, the eboot andlibSceFios2.prxhas value == addend.Imported from boykopovar/AnyPS5. Originally posted by SuperCatElvis on 2026-10-15T11:08:28Z.
@SandstromPL Thanks! Re-ran on
d92a8da(relinker-only build on Linux, same files). Title is CUSA02636: eboot from the 01.03 patch,libc.prxandlibSceFios2.prxfrom 01.00 (the patch ships nosce_module).Stops on
d92a8da, in order. Each one is the next stop after getting past the previous one in a scratch branch:Eboot (
--skip-sce-module)Cannot decode instruction: Instruction exceeds 15 bytes (offset 0x3ee2d0): the syscall scan decodes a relative jump table (99 fc ff ff) as code and lands mid-instruction, so none of the later offsets is reached.Imported TLS relocation 16 is not supported for this target (offset 0x20e5ab8). The eboot imports one thread-local variable from libc,JHvEnCQLPQI#x#w(DTPMOD64 at 0x20e5ab8, DTPOFF64 at 0x20e5ac0). My earlier checkout passed these through as imports, which is why that EXE reached the loader.Bundled modules
4.
libSceFios2.prx: Unsupported symbol attributes:(empty name): theSTT_SECTIONat index 1 (st_info0x03,st_shndx0,st_value0, unnamed; the same inlibc.prxand the eboot).5. With #5138 merged:
libSceFios2.prx: Invalid guest TLS relocation. In these modules the index-1 symbol is referenced only byR_X86_64_DTPMOD64with addend 0 (13 inlibc.prx, 3 inlibSceFios2.prx, e.g. slot 0x503b0), never by RELATIVE. Rewriting those to symbol 0, as #5138 does for RELATIVE, gets past it.6.
libc.prx: RELATIVE relocation has a symbol(slot 0xbc880).7.
libc.prx: Guest PREINIT_ARRAY has no module initializer.8.
Cyclic guest initialization dependency: libSceFios2.prx: these modules list their dependencies in 0x6100000f, not 0x61000045; falling back to it fixes the order.9.
PLT not found after the last unwind function (offset 0x3d033): both modules have their PLT at 0xc8, at the start of the text segment. InlibSceFios2.prxthe 0x115d1 bytes after 0x3d033 are a 0x7d-byte start routine with no unwind entry (0x3d040; calls through the PLT, walks an init list, nofs:accesses), then read-only data including the zlib CRC-32 table.10. Without trimming:
overlapping instruction boundaries (offset 0x3d1fe), inside that CRC-32 table. Trimming at the last unwind function (what my local build effectively did, so "data after the PLT" in my earlier comment was only true for the eboot) gets past it, but also drops the start routine from code analysis. Harmless here, not a general rule.11.
Code analysis: invalid relative relocation (offset 0xbc880). Accepting it there too, the full conversion completes.RELATIVE with a nonzero symbol index: eboot 0 of 173,750;
libSceFios2.prx0 of 207;libc.prx6 of 660, all withst_value== addend andst_other0:st_infost_shndxst_value= addendst_sizeEverything except the jump-table handling was a scratch change to reach the next stop, not a proposed fix. Happy for you to take the RELATIVE case and
libSceDiscMap.The jump-table handling was also necessary to get the conversion working. I haven't prepared a PR for it, but hopefully these findings help with addressing it upstream.
AI-assisted (Claude Code); every run above was done locally on these files.
Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-15T12:18:04Z.
@SuperCatElvis Thanks, that's everything I needed! Here's the plan:
st_value == addend) and has offered it on #5138, so I'll leave it with them rather than duplicate it. Your table of the sixlibc.prxrelocations should help there.FindSceCodeEndonly looks for the PLT after the last unwind function. I'll make it also accept a PLT before the code and end the extent at the last unwind function, so the CRC-32 table stays out. The start routine at 0x3d040 stays unanalysed, and I'll note that in the debt file.maina DT_INIT of 0 is read as "no initializer".libSceDiscMap: I'll take it, but open it later. Onmaina PS4 module's imports aren't tied to a library (its needed modules are in 0x6100000f, not 0x61000045), so a missinglibSceDiscMap.prxis skipped at load. It only becomes the stop once stop 8 is fixed.mainevery other stop sits behind stop 1. Would you open a PR for your jump-table handling, or at least for the syscall and call-site scan part? Or share the diff, and I'll carry it withCo-authored-by.Questions, if you still have the files at hand:
libc.prxandlibSceFios2.prxboth have DT_INIT (tag 12) present with value 0?When the branches are up, it would help if you could swap each one in for the matching scratch change, then confirm the stop is gone and the next one is as you listed.
AI Assisted
Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-15T13:39:40Z.
Update: libSceFreeType is now #6376: the six FreeType functions the OpenOrbis samples import, on the bundled FreeType, in the PS4 LP64 layout. With it four more samples start and draw their text:
Hello, World!in two sizes.Logged into: Player (ID: 0x10000000).A correction to my last update: the OpenOrbis toolchain has 16 sample programs, not 15 (
library_exampleis the moduleusing_libraryloads). With #5990 to #5994, #6376, #5138 and a change that answers the LinuxTIOCGWINSZwithENOTTYas #5569 does, 14 of the 16 start on Windows (main92cdc7b62).Other changes since then:
AI-assisted: yes (Claude Code). I ran every build, test and sample above locally on Windows 11; no PS4 hardware was used.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-15T18:37:16Z.
Update: the OpenOrbis piglet sample now runs too, with three new pull requests:
sceKernelLoadStartModuleloads a system library given by its console path (/system/common/lib/<name>.sprx, or the sandboxed/<sandbox word>/common/lib/<name>.sprx), which is how the sample loads the two libraries below.libScePrecompiledShaders: a table with AnyPS5's own GLSL source for the two shaders the sample looks up, since the console table holds Sony's compiled shaders.libScePigletv2VSH: the 47 functions the sample imports (scePigletSetConfigurationVSH, 13 EGL 1.4 and 33 OpenGL ES 2.0 functions) on Vulkan. A correction to my last update: that is 47 functions, not 48; the 48th import is the shader table.The sample loads both modules, prints
GL_RENDERER: AnyPS5 Piglet on Vulkanand draws its rotating textured square at 59.96 FPS.With these and #5990 to #5994, #6376, #5138 and a change that answers the Linux
TIOCGWINSZwithENOTTYas #5569 did, 15 of the 16 OpenOrbis sample programs start on Windows (main03c4cb5e7).networkingwas not run, since it listens on a TCP port.Other changes since then: #5990 and #5993 are rebased for their needs rebase labels; both conflicts were adjacent entries in the debt files.
AI-assisted: yes (Claude Code). I ran every build, test and sample above locally on Windows 11; no PS4 hardware was used.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-15T19:43:24Z.
Update: the first complete PS4 homebrew game plays on AnyPS5.
Fritz Dash is a one-button platformer made with the OpenOrbis toolchain. I built its PS4
eboot.binfrom source with the toolchain's makefile,create-fselfincluded. With my open PS4 pull requests and #6545, its menu, level select and first level run at 59.94 FPS on Windows, played with the keyboard's controller mapping.#6545 is the one new fix it needed.
create-fselfdrops aDT_INIT_ARRAYSZof 0, so a plain-C program without constructors hasDT_INIT_ARRAYand no size. The relinker refused that ("incomplete initializer array"); FreeBSD's rtld runs no initializers for it, and the relinker now does the same.Two other homebrew programs I built the same way:
create-fselfquirks, which I have not changed in AnyPS5 because I have no evidence it runs on a real PS4:.data. The.data.<name>sections after it become zero-filled memory that only their relocations fill.PT_LOADheader appears twice, which the relinker rejects as overlapping.AI-assisted: yes (Claude Code). I ran every build and game above locally on Windows 11; no PS4 hardware was used.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by SuperCatElvis on 2026-10-15T21:08:18Z.
@SandstromPL Thanks! Answers from the files:
libc.prxhas a non-empty PREINIT_ARRAY: 0xc2040, size 8 (one entry), with INIT_ARRAY at 0xc2048 of size 0. InlibSceFios2.prx, PREINIT_ARRAY and INIT_ARRAY both have size 0, so stop 7 only applies tolibc.prx.Correction to my last comment: 0x3d040 in
libSceFios2.prxis its DT_FINI, not a start routine.libc.prxhas the same layout: DT_FINI 0x828a0 sits just after its last unwind function [0x82890, 0x82896), as the only routine without an unwind entry, followed by about 213 KiB of read-only data with nofs:loads. So ending the extent at the last unwind function leaves the DT_FINI routine of both modules unanalysed. Thelibc.prxone reads slot 0xbc880 (the RELATIVE-with-symbol pointer) and calls 0x2fa50 through it.libc.prx: PLT [0xc8, 0x5b8), 78 entries; first unwind function at 0x5c0.libSceFios2.prx: PLT [0xc8, 0x5d8), 80 entries; first unwind function at 0x5e0.Both have 8 zero bytes between the PLT and that function (function ranges from
ReadExceptionFunctions).Jump tables: diff attached, against
4eb91ea. Please carry it withCo-authored-by. It addsRelativeJumpTables.{hpp,cpp}: one detector for a trailing relative jump table in an unwind range, or in the gap up to the next function. The syscall and call-site scans run on a copy with those tables replaced by NOPs. The collector trims the unwind range at the table, adds no roots inside tables, and the CFG doesn't enter them, including fall-through after a noreturn call. It only runs with PT_SCE_DYNLIBDATA (pipeline) or an SCE dynamic base (collector). No new tests yet; the existing relinker suite is 182/182 on Linux. On4eb91eawith the diff the eboot passes both scans and stops at stop 2; with my scratch TLS passthrough on top it converts. Without the CFG part the collector still stops at 0x37d73f.The rest of the plan sounds good. I’ll leave it with you from here. Let me know if there’s anything more I can help with.
AI-assisted (Claude Code); every number above is from runs on these files.
ps4-jump-tables.diff.txt
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T21:50:46Z.
I evaluated the attached relative jump-table patch against current main and added a synthetic detector fixture locally. The relinker-only suite passes 182/182, including positive detection and rejection cases, but I do not have a reproducible eboot/fixture for the table in the reported PS4 case, and #6354 now addresses the earlier code-extent failure for the Until Dawn modules. I am holding off on opening a PR until the actual affected eboot (or a reduced binary fixture that reproduces the collector failure) is available, so table recognition can be validated against the reported case and nearby non-table code.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T21:54:43Z.
Follow-up: I opened PR #6595, carrying the attached detector with your requested co-author credit and adding synthetic positive/negative coverage. The relinker-only CTest suite passes 182/182 locally, along with conventions. The PR description distinguishes that local validation from your reported eboot run; I did not run the eboot locally.
Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-15T23:13:41Z.
Update: the relinker now converts two retail PS4 titles, Bloodborne (CUSA00900) and Limbo (CUSA01664), both from dumps of my own copies.
They convert but do not start yet. The relinker's import audit against today's libraries:
libSceGnmDriverfunction is absent, which is the PS4 graphics driver. Most of the rest are PSN libraries.AI-assisted: yes (Claude Code). I ran every build and conversion above locally on Windows 11; no PS4 hardware was used, and no game files leave my machine.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-16T04:45:49Z.
@SuperCatElvis Thanks, that answers all three!
Jump tables: MarcZX100 carried your diff as #6595, with your
Co-authored-by, so I won't open another one. Get-fix's #6618 handles tables inside a function's unwind range (Bloodborne, and Limbo with #6619), but not tables in the gap after the range, like your 0x76fdbc. #6595 is now aimed at that gap. The two PRs conflict, and MarcZX100 offered to rebase #6595 on #6618 if #6618 lands first.DT_FINI: thanks for the correction. #6354 ends the code extent at the last unwind function, so both
DT_FINIroutines stay out of the code analysis: 0x3d040 inlibSceFios2.prxand 0x828a0 inlibc.prx. I've fixed its description and debt line, which called 0x3d040 a start routine. Since the Windows and macOS outputs callDT_FINIat exit, anfs:access in it would run unchanged. You mentioned nofs:loads in the data after it; does thelibc.prxroutine itself have anyfs:(0x64) prefix? Your PLT ranges also mean #6354's overlap check passes in both modules.Stop 7: #6684 treats a present
DT_INITof 0 as the module initializer, solibc.prxgets past the preinit check. Its description asks two things: whether it gets past stop 7 with stop 8 next, and whether the code from 0 to the PLT at 0xc8 reads the preinit array at 0xc2040 or makes anyfs:access.Stop 8 is #6381, the same 0x6100000f fallback as yours, and libSceDiscMap is #6527.
Stops 5, 6 and 11: I've asked veosett on #5138 whether to fold the DTPMOD64 case (stop 5) into it, or let me open it as a follow-up. MarcZX100's #6357 accepts the RELATIVE case in both the guest reader and the code analysis (stops 6 and 11). It depends on #5138.
AI Assisted
Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-17T00:29:50Z.
Update: a retail PS4 game now plays. Limbo (CUSA01664) converts with its bundled modules, boots, and runs in game at 60 fps with sound on the AGC/Vulkan path PS5 titles use.
libSceGnmDriver, PS4 descriptors and tiling in the AGC driver, and a relinker fix for the bundled modules.It stacks on the open relinker and library PRs listed there, from this thread's contributors.
AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-17T15:32:34Z.
Hasbro Family Fun Pack (CUSA03312, base and its patch, from my own dump) now converts completely for Linux with open PRs and one new change. Windows still stops in the TLS rewrite, on bytes outside every unwind function. No game files are shared here; offsets and messages only.
Relinker built on Windows 11 Pro 26300 with WinLibs GCC 15.2.0 r7 from
main47a266cf9plus the PRs below, added one at a time. Base and patch stop at the same steps; patch offsets are in parentheses.Strict filter: inconsistent FDE function range (offset 0xd42390)(0xd43fa8)Cannot decode instruction: Instruction exceeds 15 bytes (offset 0x783c70)(0x785360)libSceFace.prx:Unsupported symbol attributes:(empty name, a section symbol)libSceFios2.prx:Invalid guest TLS relocation3b158c1e4from #6977libc.prx:RELATIVE relocation has a symbolGuestImageReader.cpp; accepting either form, a zero-value section symbol or a defined symbol whose value equals the addend, gets past itlibc.prx:Guest PREINIT_ARRAY has no module initializerCyclic guest initialization dependency: libc.prxlibSceFace.prx:PLT not found after the last unwind function (offset 0x27e21)--windowsonly:Unsupported Windows guest TLS instruction (bytes: 65 f0 5b) (offset 0x6d63c0)#6618 was also in the stack; I didn't check whether this title needs it. With everything above, the Linux conversion of base and patch completes:
Converted modules: 9(libc, libSceFios2, libSceFace, libSceFaceTracker, libSceHand, libSceHandTracker, libSceHeadTracker, libSceS3DConversion, libSceSmart),External prx references: 1345.Stops 2 and 9: bytes between unwind functions that are not code from their first byte. Both offsets lie outside every FDE range, in gaps laid out as 16-byte slots. Each slot holds a function tail followed by NOP padding, but the tail often starts in the middle of an instruction.
0x783c70(file0x787c70), in a 0x559-byte gap between the functions at0x783950–0x783ab7and0x784010. The slot is a lone48followed by a 15-byte NOP (66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00). Decoded from the48, that is 16 bytes, so the decoder rejects it. A neighbouring slot is4cfollowed byadd $8,%rsp; pop %rbx; pop %rbp; ret.0x6d63c0(VA0x6d23c0), in a 0xcb-byte gap after the function at0x6d2070–0x6d2385. The slot starts65 f0, followed bypop %rbx; pop %r14; pop %rbp; ret. Decoded from the slot start it reads asgs lock pop %rbx, which the Windows TLS rewrite rejects. Nearby slots startc0 c3(the tail ofxor %eax,%eax; ret) and40 31 c0 c3.As a local experiment only,
InstructionScannerresumed at the next 16-byte boundary after a decode failure. The eboot needed it once (stop 2). The bundled modules needed it at 9 spots, the module VAs0x968f,0x9767,0x3b897,0x3b8d6,0x3b915,0x44e97,0x44ed6,0x44f15and0xc3e90; my log line doesn't name the module. That is what got the Linux conversion through. A general form might be: for SCE images, treat bytes outside unwind-function ranges and the PLT as padding. The scans would resume after a decode failure there, and the Windows TLS rewrite would ignore segment prefixes found there, while both stay strict inside FDE ranges. That is a design call for you. If it's welcome, I can open a PR; if it fits better into the PS4 stack, say so.One more thing that made this slower to track down: the instruction scan reports virtual addresses (it is passed
segmentVAddr,RelinkerPipeline.cpp:376), whileWindowsTlsBuilderreports file offsets (header.Offset + offset). In this eboot the code segment is at file0x4000and VA0, so the two differ by0x4000.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T05:12:45Z.
Thanks for the additional Hasbro evidence. I checked the open #6618 scope: it recognizes relative jump-table data in or immediately after an unwind function, while the
0x783c70decode failure you describe is in a gap outside every FDE range; the0x6d63c0Windows TLS rewrite case is separate again. Those could be useful focused follow-ups if the proposed scan behavior is tested with positive/negative synthetic fixtures that stay strict inside FDE ranges. If you still want to pursue them, please open the branch or PR in your own authorship; I can review the resulting diffs and coordinate the overlap with #6618.