Files
AnyPS5/core/libs/tests/GuestDeferredDependentFixture.S
T
Dean Galvin 2cdb4d40d4 fix(relinker): start a deferred module's deferred dependencies before it on Windows
Since #12621 a Windows runtime module that another runtime module needs is deferred instead of started at boot, but loading a deferred module only started that module. A Unity plugin such as SPFXUnityPlugin that calls into a deferred module it needs (Il2CppUserAssemblies in Media/Modules) ran against code whose initializers had never run, and PPSA03743 crashed about 2.6 s in.

A deferred module's initialization table now lists the deferred modules it depends on (names, after the initializer array, behind a magic number so older output reads as having none). DynamicLoader starts those first, transitively and once each through the existing per-module state, with the start arguments of the load that began it, then starts the module itself. The module start result stays the module's own. Boot still starts no deferred module.

Linux is unchanged: its deferred modules still start only when loaded.
2026-11-03 16:03:33 +13:00

11 lines
244 B
ArmAsm

.section .ginit,"dr"
.p2align 3
.globl __aps5_guest_initialize
__aps5_guest_initialize:
.rva DeferredStart_nid_no_patch
.long 1
.rva DeferredInitializerSlot_nid_no_patch
.long 0x44504541
.long 1
.asciz "guest_deferred_module_fixture.guest.prx"