From 79ca190666fdc49101ff92ff6be8d821424a33a1 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Sat, 30 May 2015 07:20:34 +0200 Subject: [PATCH] lpc2387: Add missing exception tables to linker script Copied from kinetis_common --- cpu/lpc2387/ldscripts/lpc2387.ld | 33 ++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/cpu/lpc2387/ldscripts/lpc2387.ld b/cpu/lpc2387/ldscripts/lpc2387.ld index 472718e6b1..858e1b2e3d 100644 --- a/cpu/lpc2387/ldscripts/lpc2387.ld +++ b/cpu/lpc2387/ldscripts/lpc2387.ld @@ -89,13 +89,38 @@ SECTIONS } >flash /* put all the above into FLASH */ . = ALIGN(4); - /* .ARM.exidx is sorted, so has to go in its own output section. */ - __exidx_start = .; + /* The .extab, .exidx sections are used for C++ exception handling */ + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > flash + + PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } >flash - __exidx_end = .; + } > flash + PROVIDE_HIDDEN (__exidx_end = .); + + .eh_frame_hdr : + { + *(.eh_frame_hdr) + } > flash + + .eh_frame : ONLY_IF_RO + { + KEEP (*(.eh_frame)) + } > flash + + .gcc_except_table : ONLY_IF_RO + { + *(.gcc_except_table .gcc_except_table.*) + } > flash + +/* + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } > sram_u AT > flash + .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } > sram_u AT > flash +*/ _etext = . ; /* define a global symbol _etext just after the last code byte */