Skip to content

Fix fSELF program header offset for SPRXPatcher ELFs - #160

Merged
Toastbrot236 merged 1 commit into
LittleBigRefresh:mainfrom
Cri4Key:patch-1
Oct 21, 2026
Merged

Toastbrot236 merged 1 commit into
LittleBigRefresh:mainfrom
Cri4Key:patch-1

Conversation

@Cri4Key

@Cri4Key Cri4Key commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

FakeEncryptGameEbootStep assumes the program header table starts right after the ELF header. This is correct for original, untouched EBOOTs, but ELFs patched via SPRXPatcher have such table moved at the end of the file and thus the offset needs to be recomputed correctly and the table data copied at the right place. This has never been a problem so far on RPCS3 as it was ignored, but recent RPCS3 upstream changes now rely on it effectively making it now unusable on newer RPCS3 releases.

While this fix is supposed to make things correct now on Refresher side when making the fSELF, it still needs a change on RPCS3 upstream to be able to still make use of such patched ELF to load the SPRX. I have asked for implementing such changes on an hotfix PR of theirs that is supposed to fix the problem.
I'd suggest not merging this until they do that.

If RPCS3 implements the necessary fix, this PR will solve #159

Signed-off-by: Cris <36153368+Cri4Key@users.noreply.github.com>
@Cri4Key

Cri4Key commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

The fix in upstream RPCS3 has been merged in RPCS3/rpcs3#19906

RPCS3 builds after that will work again as long as this PR is merged and users perform the game patching again by using the updated version of Refresher with this fix

@Toastbrot236

Copy link
Copy Markdown
Contributor

Really cool, I'll test this PR on the new RPCS3 build later, and then I will merge.

@Toastbrot236

Copy link
Copy Markdown
Contributor

Works as expected on all 3 mainlines, they no longer crash for me once I repatch them with the build from the workflow, thanks for fixing this!

@Toastbrot236
Toastbrot236 merged commit 449cc0b into LittleBigRefresh:main Oct 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants