From 09c0a3cb2268c4be3882b611b86d008feea2ed2e Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Wed, 15 Apr 2026 18:55:08 +0200 Subject: [PATCH] qemu/mcu/arm/imx6.ld: Fix C++ linking. This commit expands the linkerscript for i.MX6-series boards to let C++ code link with the interpreter core. The linkerscript now contains all necessary sections for C++ code that uses exceptions to be part of a user module inside the MicroPython image. Signed-off-by: Alessandro Gatti --- ports/qemu/mcu/arm/imx6.ld | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/qemu/mcu/arm/imx6.ld b/ports/qemu/mcu/arm/imx6.ld index 7664861609..48c65e9a40 100644 --- a/ports/qemu/mcu/arm/imx6.ld +++ b/ports/qemu/mcu/arm/imx6.ld @@ -28,6 +28,13 @@ SECTIONS *(.text*) *(.rodata*) . = ALIGN(4); + *(.ARM.extab*) + *(.gnulinkonce.armextab.*) + . = ALIGN(4); + __exidx_start = .; + *(.ARM.exidx*) + *(.gnu.linkonce.armexidx.*) + __exidx_end = .; _etext = .; _sidata = _etext; } > RAM