From e14ae0c3d9cc471000533624b47d43a500cc0979 Mon Sep 17 00:00:00 2001 From: ParantezTech Date: Fri, 20 Feb 2026 17:58:54 +0300 Subject: [PATCH] exclude trampoline from code mapping --- src/core/module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/module.cpp b/src/core/module.cpp index d0fae3a9f..2522a82a0 100644 --- a/src/core/module.cpp +++ b/src/core/module.cpp @@ -113,7 +113,7 @@ void Module::LoadModuleToMemory(u32& max_tls_index) { // Map module segments (and possible TLS trampolines) void** out_addr = reinterpret_cast(&base_virtual_addr); - memory->MapMemory(out_addr, ModuleLoadBase, aligned_base_size + TrampolineSize, + memory->MapMemory(out_addr, ModuleLoadBase, aligned_base_size, MemoryProt::CpuReadWrite | MemoryProt::CpuExec, MemoryMapFlags::NoFlags, VMAType::Code, name); LOG_INFO(Core_Linker, "Loading module {} to {}", name, fmt::ptr(*out_addr));