move wamr mmap memory region into .text segment for wamr aot mode

This commit is contained in:
2026-04-17 00:25:22 +02:00
parent 3563a810a1
commit 18c3f13a71
3 changed files with 13 additions and 4 deletions

View File

@ -288,8 +288,14 @@ rec {
domain = "gitea.local.chriphost.de";
owner = "christoph";
repo = "wamr";
rev = "fd69a4e76ec0d384bd79f514772b7dfa240fc0d7";
hash = "sha256-rlCx4isI0k6rC9E0hWIA9LeinqiACug7zxj9z/e4SBQ=";
# After placing mmap region in .text segment:
rev = "1521011029b0531c02eb0142c239b7f85a3165b5";
hash = "sha256-/uLSank+Aacfj+SBliYTaD320cCA1lBRtSRALXErJGE=";
# Before placing mmap region in .text segment:
# rev = "fd69a4e76ec0d384bd79f514772b7dfa240fc0d7";
# hash = "sha256-rlCx4isI0k6rC9E0hWIA9LeinqiACug7zxj9z/e4SBQ=";
};
nativeBuildInputs = with pkgs; [cmake];

View File

@ -18,7 +18,6 @@ SECTIONS {
/* Code and readonly data */
.text : {
/* fill gaps with int3 opcode to detect invalid jumps */
/* TODO: Crashes */
FILL(0xcc)
/* multiboot header */
@ -51,7 +50,9 @@ SECTIONS {
}
/* Data and Stacks */
. = 0x200000;
/* NOTE: When including the WAMR mmap region inside .text, it has to be large */
/* . = 0x200000; */
. = ALIGN(4096);
.data : {
KEEP (*(".startup_stack"))
KEEP (*(".kernel_stack"))

View File

@ -53,6 +53,8 @@ WAMRCFLAGS := "\
--target=i386 \
--cpu=generic \
--opt-level=0 \
--enable-indirect-mode \
--disable-llvm-intrinsics \
"
XXD := "xxd"