Skip to content

Commit 6c1d1f3

Browse files
agattidpgeorge
authored andcommitted
qemu/mcu/arm/mps2.ld: Add .ARM.exidx section to the linkerscript.
This commit fixes a linking issue on certain Arm toolchains where library code is compiled with exception support. If a library with exception support is included in the MicroPython build, the linker had no place to put the stack unwinding tables necessary to perform exception handling at runtime. This change adds a new section to the linkerscript (and therefore the final ELF file) where that data can be placed into. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent 6650506 commit 6c1d1f3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ports/qemu/mcu/arm/mps2.ld

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ SECTIONS
1919
*(.rodata*)
2020
. = ALIGN(4);
2121
_etext = .;
22-
_sidata = _etext;
22+
} > RAM
23+
24+
.ARM.exidx : AT ( _etext ) {
25+
. = ALIGN(4);
26+
__exidx_start = .;
27+
*(.ARM.exidx*)
28+
*(.gnu.linkonce.armexidx.*)
29+
__exidx_end = .;
30+
_sidata = __exidx_end;
2331
} > RAM
2432

2533
.data : AT ( _sidata )

0 commit comments

Comments
 (0)