mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 20:36:16 +00:00
kernel: Clean up and fix some mistakes. (#2907)
This commit is contained in:
parent
ff1339b0b6
commit
3a090e988c
8 changed files with 28 additions and 42 deletions
|
@ -127,7 +127,7 @@ void Linker::Execute(const std::vector<std::string> args) {
|
|||
}
|
||||
}
|
||||
params.entry_addr = module->GetEntryAddress();
|
||||
RunMainEntry(¶ms);
|
||||
ExecuteGuest(RunMainEntry, ¶ms);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -366,7 +366,8 @@ void* Linker::TlsGetAddr(u64 module_index, u64 offset) {
|
|||
if (!addr) {
|
||||
// Module was just loaded by above code. Allocate TLS block for it.
|
||||
const u32 init_image_size = module->tls.init_image_size;
|
||||
u8* dest = reinterpret_cast<u8*>(heap_api->heap_malloc(module->tls.image_size));
|
||||
u8* dest = reinterpret_cast<u8*>(
|
||||
Core::ExecuteGuest(heap_api->heap_malloc, module->tls.image_size));
|
||||
const u8* src = reinterpret_cast<const u8*>(module->tls.image_virtual_addr);
|
||||
std::memcpy(dest, src, init_image_size);
|
||||
std::memset(dest + init_image_size, 0, module->tls.image_size - init_image_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue