mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-06-02 04:38:28 -06:00
Run malloc_init before initializing libs
Allows LLE libSceMoveTracker.
This commit is contained in:
parent
4a5a47e53c
commit
dcb5d4dd38
@ -172,13 +172,15 @@ void Linker::Execute(const std::vector<std::string>& args) {
|
|||||||
ipc.WaitForStart();
|
ipc.WaitForStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadSharedLibraries();
|
LoadLibcInternal();
|
||||||
|
|
||||||
if (malloc_init != nullptr) {
|
if (malloc_init != nullptr) {
|
||||||
// Call _malloc_init
|
// Call _malloc_init
|
||||||
malloc_init();
|
malloc_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoadSharedLibraries();
|
||||||
|
|
||||||
// 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.
|
||||||
s64 phys_addr{};
|
s64 phys_addr{};
|
||||||
|
|||||||
@ -124,9 +124,17 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadLibcInternal() {
|
||||||
|
for (auto& module : m_modules) {
|
||||||
|
if (module->name.contains("libSceLibcInternal")) {
|
||||||
|
module->Start(0, nullptr, nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LoadSharedLibraries() {
|
void LoadSharedLibraries() {
|
||||||
for (auto& module : m_modules) {
|
for (auto& module : m_modules) {
|
||||||
if (module->IsSharedLib()) {
|
if (module->IsSharedLib() && !module->name.contains("libSceLibcInternal")) {
|
||||||
module->Start(0, nullptr, nullptr);
|
module->Start(0, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user