From 7846a2f3b636cecd0c287d1840966dee93ec8905 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Wed, 20 May 2026 21:31:31 +0200 Subject: [PATCH] fix linker.ld - wamr subsections have to be declared before the .text* wildcard --- targets/linker.ld | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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*") }