diff options
Diffstat (limited to 'src/core/hle/kernel/k_process.cpp')
| -rw-r--r-- | src/core/hle/kernel/k_process.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 51f86b2afd..355a2a5f3b 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -28,6 +28,9 @@ namespace Kernel { namespace { +// TODO: Remove this workaround when proper ASLR is implemented for all address spaces. +constexpr u64 CodeStartOffset = 0x500000UL; + Result TerminateChildren(KernelCore& kernel, KProcess* process, const KThread* thread_to_not_terminate) { // Request that all children threads terminate. @@ -1198,11 +1201,11 @@ Result KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std: break; case FileSys::ProgramAddressSpaceType::Is32Bit: flag |= Svc::CreateProcessFlag::AddressSpace32Bit; - code_address = 0x20'0000; + code_address = 0x20'0000 + CodeStartOffset; break; case FileSys::ProgramAddressSpaceType::Is32BitNoMap: flag |= Svc::CreateProcessFlag::AddressSpace32BitWithoutAlias; - code_address = 0x20'0000; + code_address = 0x20'0000 + CodeStartOffset; break; } |
