From 67b2ee3ea58b980735d4cff5b514bb332a942240 Mon Sep 17 00:00:00 2001 From: Ryan Teal Date: Tue, 2 Jul 2019 16:30:43 +0100 Subject: [PATCH] Add TLS memory map --- app/src/main/cpp/core/arm/cpu.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/cpp/core/arm/cpu.cpp b/app/src/main/cpp/core/arm/cpu.cpp index 06895271..a9ce288c 100644 --- a/app/src/main/cpp/core/arm/cpu.cpp +++ b/app/src/main/cpp/core/arm/cpu.cpp @@ -15,6 +15,9 @@ namespace core { // Map stack memory memory::Map(uc, 0x3000000, 0x1000000, "stack"); SetRegister(UC_ARM64_REG_SP, 0x3100000); + memory::Map(uc, 0x2000000, 0x1000, "tls"); + SetRegister(UC_ARM64_REG_TPIDRRO_EL0, 0x2000000); + currentContext = this; }