Skip to content

Commit b915910

Browse files
authored
aot: avoid forcing mmap low addresses on NuttX (#4776)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
1 parent 2a2dd19 commit b915910

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/iwasm/aot/aot_loader.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ loader_mmap(uint32 size, bool prot_exec, char *error_buf, uint32 error_buf_size)
307307
#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64) \
308308
|| defined(BUILD_TARGET_RISCV64_LP64D) \
309309
|| defined(BUILD_TARGET_RISCV64_LP64)
310-
#if !defined(__APPLE__) && !defined(BH_PLATFORM_LINUX_SGX)
310+
#if !defined(__APPLE__) && !defined(BH_PLATFORM_LINUX_SGX) \
311+
&& !defined(BH_PLATFORM_NUTTX)
311312
/* The mmapped AOT data and code in 64-bit targets had better be in
312313
range 0 to 2G, or aot loader may fail to apply some relocations,
313314
e.g., R_X86_64_32/R_X86_64_32S/R_X86_64_PC32/R_RISCV_32.

0 commit comments

Comments
 (0)