From 0169ea5155d553094d33613e94a6c597ee2e0860 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 21 May 2020 18:39:13 +0800 Subject: [PATCH] nrf: discard arm exception sections Since these exceptions are unused, don't include them in the output binary. Signed-off-by: Sean Cross --- ports/nrf/boards/common.template.ld | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/ports/nrf/boards/common.template.ld b/ports/nrf/boards/common.template.ld index 334a3506e1..5982b8ba0d 100644 --- a/ports/nrf/boards/common.template.ld +++ b/ports/nrf/boards/common.template.ld @@ -70,18 +70,6 @@ SECTIONS _etext = .; /* define a global symbol at end of code */ } >FLASH_FIRMWARE - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } >FLASH_FIRMWARE - - .ARM : - { - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - } >FLASH_FIRMWARE - /* used by the startup to initialize data */ _sidata = .; @@ -145,6 +133,14 @@ SECTIONS . = ALIGN(4); } >RAM + /* Remove exception unwinding information, since Circuit Python + does not support this GCC feature. */ + /DISCARD/ : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + *(.ARM.exidx*) + } + /* Remove information from the standard libraries */ /* /DISCARD/ :