mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-24 23:36:00 +03:00
[GH-ISSUE #3997] [Feature Request]: Loading native shared libraries for patching, modding and debugging games #1199
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#1199
Loading…
Add table
Add a link
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?
Originally created by @Dasaav-dsv on GitHub (Feb 6, 2026).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/3997
Checklist
Description
ShadPS4 should be able to load native to the user's OS shared libraries (.dll/.so) from a list they provided when launching ShadPS4.
Reason
It would be very useful for executing custom code in the game's context by e.g. placing hooks or applying complex patches, where the existing ShadPS4 patch system does not cut it.
Not having to write assembly and having easy access to all native OS functionality (as opposed to loading a custom-built .prx).
An example of something I had to do to debug Bloodborne bugs was writing a heap allocation sanitizer tool that detects OOB writes with readonly pages:
https://github.com/Dasaav-dsv/bb-heap-x
In order to get it working on windows, I wrote a
version.dllproxy DLL that gets loaded by ShadPS4, loads my actual library (on Linux all of this can be replaced byLD_PRELOAD), which then registers an exception handler to catch a software breakpoint I placed at the eboot entrypoint and finally execute my logic. Not having to do this would be great.Another possibility is game mods, and in the future, proper ShadPS4 plugins (this initial implementation leaves a lot of room for this).
Examples
Game:MainthreadMock-up library entrypoint declaration (in C):
NOTE: I am willing to implement and maintain this feature.