CPU/CodeCache: Use code buffer section on Android
This commit is contained in:
parent
1adf36ccb2
commit
5bf7227790
|
@ -130,10 +130,11 @@ static constexpr u32 RECOMPILER_CODE_CACHE_SIZE = 48 * 1024 * 1024;
|
||||||
static constexpr u32 RECOMPILER_FAR_CODE_CACHE_SIZE = 16 * 1024 * 1024;
|
static constexpr u32 RECOMPILER_FAR_CODE_CACHE_SIZE = 16 * 1024 * 1024;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// On Linux ARM32/ARM64, we use a dedicated section in the ELF for storing code.
|
// On Linux ARM32/ARM64, we use a dedicated section in the ELF for storing code. This is because without
|
||||||
// This is because without ASLR, or on certain ASLR offsets, the sbrk() heap ends up immediately following the text/data
|
// ASLR, or on certain ASLR offsets, the sbrk() heap ends up immediately following the text/data sections,
|
||||||
// sections, which means there isn't a large enough gap to fit within range on ARM32.
|
// which means there isn't a large enough gap to fit within range on ARM32. Also enable it for Android,
|
||||||
#if defined(__linux__) && (defined(CPU_ARCH_ARM32) || defined(CPU_ARCH_ARM64))
|
// because MAP_FIXED_NOREPLACE may not exist on older kernels.
|
||||||
|
#if (defined(__linux__) && (defined(CPU_ARCH_ARM32) || defined(CPU_ARCH_ARM64))) || defined(__ANDROID__)
|
||||||
#define USE_CODE_BUFFER_SECTION 1
|
#define USE_CODE_BUFFER_SECTION 1
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang section bss = ".jitstorage"
|
#pragma clang section bss = ".jitstorage"
|
||||||
|
|
Loading…
Reference in New Issue