diff --git a/targets/linker.ld b/targets/linker.ld index 9fed762..b895d0f 100644 --- a/targets/linker.ld +++ b/targets/linker.ld @@ -46,19 +46,20 @@ SECTIONS { KEEP (*(".text.startup")) - . = ALIGN(4096); - _wamr_aot_start = .; - *(".text.wamr_aot") - _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 */ + + /* _wamr_aot_start = .; */ + *(".text.wamr_aot") + /* _wamr_aot_end = .; */ + + /* _wamr_mmap_start = .; */ + *(".text.wamr_mmap") + /* _wamr_mmap_end = .; */ + + /* _text_start = .; */ *(".text*") + /* _text_end = .; */ *(".rodata*") } diff --git a/targets/startup.s b/targets/startup.s index f40cdcb..76d8805 100644 --- a/targets/startup.s +++ b/targets/startup.s @@ -55,4 +55,7 @@ _start: # Set the size of the _start symbol to the current location '.' minus its start. # This is useful when debugging or when you implement call tracing. -.size _start, . - _start + +# If this is enabled, the linker.ld needs to define a symbol before the .text segment. +# Otherwise, there's a gap that prevents FAIL from disassembling the AOT. +# .size _start, . - _start