From bf6558918359a4aa81514f56168cdd8fe5c28efa Mon Sep 17 00:00:00 2001 From: Tomaz Solc Date: Mon, 5 Mar 2012 15:51:31 +0100 Subject: Support for exception handling in linker scripts. This is needed even in plain C when 64 bit variable (e.g. long long int) arithmetic is used. For example it is required when newlib is compiled with --enable-newlib-io-long-long. Conflicts: lib/stm32/f1/libopencm3_stm32f1.ld lib/stm32/f2/libopencm3_stm32f2.ld --- lib/stm32/f2/vector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stm32/f2/vector.c') diff --git a/lib/stm32/f2/vector.c b/lib/stm32/f2/vector.c index 1c901da..64d2426 100644 --- a/lib/stm32/f2/vector.c +++ b/lib/stm32/f2/vector.c @@ -21,7 +21,7 @@ #define WEAK __attribute__ ((weak)) /* Symbols exported by the linker script(s): */ -extern unsigned _etext, _data, _edata, _ebss, _stack; +extern unsigned __exidx_end, _data, _edata, _ebss, _stack; void main(void); void reset_handler(void); @@ -224,7 +224,7 @@ void reset_handler(void) __asm__("MSR msp, %0" : : "r"(&_stack)); - for (src = &_etext, dest = &_data; dest < &_edata; src++, dest++) + for (src = &__exidx_end, dest = &_data; dest < &_edata; src++, dest++) *dest = *src; while (dest < &_ebss) -- cgit v1.2.3