mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-18 04:45:20 +00:00
[rpcsx-os] linker: fix module load order
This commit is contained in:
parent
b12cc68bf3
commit
1d55e83965
4 changed files with 144 additions and 71 deletions
|
|
@ -278,6 +278,13 @@ static int ps4Exec(orbis::Process *mainProcess,
|
|||
auto libkernel = rx::linker::loadModuleFile(
|
||||
"/system/common/lib/libkernel_sys.sprx", mainProcess);
|
||||
|
||||
if (libkernel == nullptr) {
|
||||
std::fprintf(stderr, "libkernel not found\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
libkernel->id = mainProcess->modulesMap.insert(libkernel);
|
||||
|
||||
// *reinterpret_cast<std::uint32_t *>(
|
||||
// reinterpret_cast<std::byte *>(libkernel->base) + 0x6c2e4) = ~0;
|
||||
|
||||
|
|
@ -502,6 +509,7 @@ int main(int argc, const char *argv[]) {
|
|||
std::abort();
|
||||
}
|
||||
|
||||
executableModule->id = initProcess->modulesMap.insert(executableModule);
|
||||
initProcess->processParam = executableModule->processParam;
|
||||
initProcess->processParamSize = executableModule->processParamSize;
|
||||
|
||||
|
|
@ -517,8 +525,6 @@ int main(int argc, const char *argv[]) {
|
|||
status = 1;
|
||||
}
|
||||
|
||||
// entryPoint();
|
||||
|
||||
// rx::vm::printHostStats();
|
||||
rx::vm::deinitialize();
|
||||
rx::thread::deinitialize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue