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
This commit is contained in:
Tomaz Solc
2012-03-05 15:51:31 +01:00
committed by Piotr Esden-Tempski
parent c3038bc876
commit bf65589183
6 changed files with 34 additions and 33 deletions

View File

@@ -40,17 +40,22 @@ SECTIONS
. = ALIGN(4);
} >rom
/* exception index - required due to libgcc.a issuing /0 exceptions */
__exidx_start = .;
/*
* Another section used by C++ stuff, appears when using newlib with
* 64bit (long long) printf support
*/
.ARM.extab : {
*(.ARM.extab*)
} >rom
.ARM.exidx : {
*(.ARM.exidx*)
} > rom
__exidx_end = .;
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} >rom
. = ORIGIN(ram);
_etext = .;
.data : {
.data : AT (__exidx_end) {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
@@ -64,11 +69,6 @@ SECTIONS
_ebss = .;
} >ram
/* exception unwind data - required due to libgcc.a issuing /0 exceptions */
.ARM.extab : {
*(.ARM.extab*)
} >ram
. = ALIGN(4);
end = .;
}