diff --git a/targets/linker.ld b/targets/linker.ld index 64b4b60..9fed762 100644 --- a/targets/linker.ld +++ b/targets/linker.ld @@ -45,12 +45,21 @@ SECTIONS { /* . += 16; /\* padding after data, workaround for import-trace *\/ */ KEEP (*(".text.startup")) + + . = ALIGN(4096); + _wamr_aot_start = .; *(".text.wamr_aot") - *(".text*") + _wamr_aot_end = .; + . = ALIGN(4096); _wamr_mmap_start = .; *(".text.wamr_mmap") _wamr_mmap_end = .; + + /* .wamr_aot and .wamr_mmap have to be placed before .text, + * otherwise they'll be caught by the wildcard */ + *(".text*") + *(".rodata*") }