mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 22:15:17 -04:00
Loader: Fix (all?) remaining bugs in ldr:pm.
Loader now works when booted as a KIP1. NOTE: ldr:ro still needs debugging.
This commit is contained in:
parent
9944d8e7e1
commit
e05f199394
18 changed files with 331 additions and 417 deletions
|
@ -48,7 +48,7 @@ class AutoCloseMap {
|
|||
return rc;
|
||||
}
|
||||
|
||||
if (R_FAILED((rc = svcMapProcessMemory((void *)try_address, process_h, try_address, size)))) {
|
||||
if (R_FAILED((rc = svcMapProcessMemory((void *)try_address, process_h, address, size)))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ struct MappedCodeMemory {
|
|||
return rc;
|
||||
}
|
||||
|
||||
if (R_FAILED((rc = svcMapProcessMemory((void *)try_address, this->process_handle, try_address, size)))) {
|
||||
if (R_FAILED((rc = svcMapProcessMemory((void *)try_address, this->process_handle, this->code_memory_address, size)))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ struct MappedCodeMemory {
|
|||
|
||||
void Unmap() {
|
||||
if (this->IsMapped()) {
|
||||
if (R_FAILED(svcUnmapProcessMemory(this->mapped_address, this->process_handle, this->base_address, this->size))) {
|
||||
if (R_FAILED(svcUnmapProcessMemory(this->mapped_address, this->process_handle, this->code_memory_address, this->size))) {
|
||||
/* TODO: panic(). */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue