Skip to content

sce_stubs: add AGC imports used by homebrew graphics - #71

Closed
mihawk-99 wants to merge 1 commit into
ps5-payload-dev:masterfrom
mihawk-99:add-agc-stubs
Closed

mihawk-99 wants to merge 1 commit into
ps5-payload-dev:masterfrom
mihawk-99:add-agc-stubs

Conversation

@mihawk-99

Copy link
Copy Markdown
Contributor

My Vulkan and RetroArch ports currently build their own AGC link stubs because this SDK does not ship libSceAgc or libSceAgcDriver stubs. This PR moves the 24 names used by the Vulkan stub set into sce_stubs/, using the existing assembly-symbol format.

There are 17 AGC symbols and seven AGCDriver symbols. The existing Makefile builds and installs both libraries without special cases. The payload loader already maps libSceAgc.sprx and libSceAgcDriver.sprx to their system-module IDs in crt/rtld_sprx.c.

The symbols come from the tracked Vulkan AGC files. No placeholder implementation bodies or C API signatures are copied. sceAgcInitVersioned is not included. The additional OpenGL-only names mentioned in #69 are outside this initial set.

Validation

Built the SDK locally with Clang/LLD 23.1.1, then built and installed the two new stubs. Checked that their dynamic symbol tables contain exactly the 17 and seven expected global function symbols, and their SONAMEs are libSceAgc.sprx and libSceAgcDriver.sprx.

The new sample references every function address without calling it:

make -C samples/test_agc_imports PS5_PAYLOAD_SDK=/path/to/sdk

It links through the normal SDK wrapper. Its ELF contains all 24 system imports and both expected DT_NEEDED entries. make -C samples/test_agc_imports test can then exercise loading on a console; if it reaches main, it prints each resolved address.

Draft: I have not run that new sample on a console or independently rechecked every candidate against a firmware export table during this preparation. Existing downstream native-title use is useful evidence, but does not replace ordinary-payload validation. This makes the proposed patch concrete for review while that verification remains outstanding.

Refs #69.

@john-tornblom

Copy link
Copy Markdown
Contributor

Use the instruction in readme to generate stubs. Headers for these proprietary libs are currently out of scope for this sdk. Feel free to create a new repo which only contains these headers, I think that would be a more appropriate place to put them

@john-tornblom

Copy link
Copy Markdown
Contributor

fixed in 1a04f75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants