mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-07-09 17:25:37 -06:00
Update linker.cpp
This commit is contained in:
parent
3949cf411f
commit
f2f2d8359a
@ -73,7 +73,7 @@ void Linker::Execute(const std::vector<std::string>& args) {
|
|||||||
// libSceLibcInternal. libSceLibcInternal's _malloc_init serves as an additional initialization
|
// libSceLibcInternal. libSceLibcInternal's _malloc_init serves as an additional initialization
|
||||||
// function called by libkernel.
|
// function called by libkernel.
|
||||||
heap_api = new HeapAPI{};
|
heap_api = new HeapAPI{};
|
||||||
static PS4_SYSV_ABI void (*malloc_init)();
|
static PS4_SYSV_ABI void (*malloc_init)() = nullptr;
|
||||||
|
|
||||||
for (const auto& m : m_modules) {
|
for (const auto& m : m_modules) {
|
||||||
const auto& mod = m.get();
|
const auto& mod = m.get();
|
||||||
@ -173,8 +173,10 @@ void Linker::Execute(const std::vector<std::string>& args) {
|
|||||||
|
|
||||||
LoadSharedLibraries();
|
LoadSharedLibraries();
|
||||||
|
|
||||||
// Call _malloc_init
|
if (malloc_init != nullptr) {
|
||||||
malloc_init();
|
// Call _malloc_init
|
||||||
|
malloc_init();
|
||||||
|
}
|
||||||
|
|
||||||
// Simulate libSceGnmDriver initialization, which maps a chunk of direct memory.
|
// Simulate libSceGnmDriver initialization, which maps a chunk of direct memory.
|
||||||
// Some games fail without accurately emulating this behavior.
|
// Some games fail without accurately emulating this behavior.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user