Ruffle, VLC and XPSemu read their GOT at a fixed 0x400000 base from app0/imports.txt and fault once all imports load #4013
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-11T21:15:49Z.
Three catalog titles ship
app0/imports.txtand contain the same start-up code: Ruffle (PPSA68091), VLC (PPSA85300) and XPSemu (PPSA97358). Each line of the file is<offset> <name>, an import's GOT slot as an offset from the start of the image. For example, the first line of Ruffle's is00000000024d5370 _init_env.The title reads the file with
fscanf(file, "%lx %127s", &offset, name)and then reads the slot atoffset + 0x400000. So it assumes the executable (ET_SCE_DYNEXEC, firstPT_LOADat vaddr 0) is loaded at 0x400000. In Ruffle, at vaddr 0x1d4b:The relinked image is mapped elsewhere, so the first read (
0x24d5370 + 0x400000) faults.On
main0a8b1d32, Ruffle reaches this point after #3725 (sinhf), #3580 (pause) and #3494 (pthread_attr_getscope) are merged. With those, every import loads and it logscan't write /data/ruffle/ruffle.log, then:rax= 0x24d5370 (gdb).FATAL: unhandled exception 0xc0000005 ... app.exe+0x11d4f,read of 0x00000000028d5370.VLC and XPSemu have the same
%lx %127sscan and animports.txtstarting with_init_env. Both still stop on imports onmain(VLC:getlogin_r, #3606; XPSemu:execv, #3544), so they would reach the same fault after those.Possible directions: load the main executable at 0x400000 when that range is free, or reserve 0x400000 + image size and mirror the image's GOT there. I have not checked which fits the loader better.
Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-12T14:36:26Z.
Update: this is now Ruffle's stop on plain
main. With #3725, #3580 and #3494 merged,main8fa5cc48(Linux, catalog run without extra PRs) loads every import, logsjailbreak ok: already root ... (can't write /data/ruffle/ruffle.log)and exits with SIGSEGV. gdb shows the same read as above:app.elf's first segment is mapped at 0x555555554000, so
0x24d5370 + 0x400000is unmapped.Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-12T15:27:45Z.
I'm taking the Linux side of this: a relinker option that places the executable's lowest load page at a requested address on Linux (
--linux-fixed-base 0x400000), the counterpart of #4140's--windows-fixed-base. Guest modules keep their normal placement. I'll post it here with Ruffle (PPSA68091) before and after, so nobody duplicates it.Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-12T16:27:59Z.
Linux side is #4593:
--linux-fixed-base 0x400000writes the executable asET_EXECwith every address rebased. With it, Ruffle (PPSA68091) gets past the0x400000(%rax)read on Linux and renders, then stops at an unrelated AGC limit (CB_COLOR_CONTROL 0x00cc0050, mode FMASK decompress). It also fixes libkernel's default-scopedlsym, which missed symbols of a non-PIE main program.Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-12T18:53:13Z.
With #4593, Ruffle's game library UI runs on Linux. It initializes the display, input and audio, and presented 2,400 frames in 60 s until the timeout. Opening Favorites starts the Flash player, which stops at an AGC limit:
CB_COLOR_CONTROL 0x00cc0050, mode FMASK decompress. Details are in the PR.Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-12T18:59:25Z.
Ruffle's next stop after #4593, the player's first FMASK decompress over a 4x MSAA target with DCC, is tracked in #4685, with the register state and a quality=Low workaround.
Imported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-10-14T05:45:37Z.
Windows side, confirmed on
main30f961266: Ruffle (PPSA68091, catalog release) runs when it's relinked with #4140's--windows-fixed-base 0x400000.Windows 11 Pro, i9-14900K, RTX 5080 (driver 32.0.16.1714), WinLibs GCC 15.2.0, Release.
eboot.binandsce_module/libc.prxwere unwrapped, andeboot.binandimports.txtwere kept inapp0. Each run lasted 60 s.relinker --windows --registry eboot.elf app.exe: exits0xC0000005after 3.8 s, atrip=app.exe+0x11d4f, reading0x28d5370. That is the fault in this issue.--windows-fixed-base 0x400000: runs the full 60 s to the library screen ("No games yet") at about 62 FPS, and exits 0 onWM_CLOSE.So no Windows code change is needed, only the option. The Linux side is #4593.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T11:56:11Z.
#4593 adds
--linux-fixed-base(Linux side, covered bylinux_fixed_base); Ruffle and XPSemu get past the GOT read on Linux, the titles' later stops are tracked elsewhere, so this issue stays open.Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-22T06:44:54Z.
Linux update: since #8973 made
0x400000the default Linux base, all three titles get past the GOT read with a plain relink, with no--linux-fixed-base. Onmaind6eafa54in my catalog sweep (headless, SDL offscreen driver):main94fbb8cea(PIE base)maind6eafa54DisplayWindowVulkan check, like the other headless UI titlesOn Windows the default from #4237 is
0x140000000, and VLC still needed--windows-fixed-base 0x400000in my last Windows runs. Should this stay open for the Windows default, or is--windows-fixed-basethe intended answer there?AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-22T09:39:00Z.
The Windows half, on
main7e2ba73e4(Windows 11, RTX 3080, WinLibs GCC 15.2, Release, 60 s each). The relink is the harness's default command, with and without--windows-fixed-base 0x400000:ImageBase0x140000000)--windows-fixed-base 0x400000app.exe+0x11d4fapp.exe+0x107004app.exe+0xc88d9fSo on Windows these titles still need the option, as
USAGE.mdsays. The default comes fromWindowsPeFormat.hpp(ImageBase = 0x140000000), which #8973 didn't touch. Would0x400000work as the Windows default too, the way #8973 did it for Linux, or does something on Windows rule that address out?AI-assisted: yes