aboutsummaryrefslogtreecommitdiff
path: root/lib/stm32/f1/libopencm3_stm32f1.ld
diff options
context:
space:
mode:
authorTomaz Solc2012-03-05 15:51:31 +0100
committerPiotr Esden-Tempski2012-04-24 09:16:22 +0200
commitbf6558918359a4aa81514f56168cdd8fe5c28efa (patch)
tree09717ec712c9879a66aada4bbce1f170d601c4ca /lib/stm32/f1/libopencm3_stm32f1.ld
parentc3038bc876c0154a375a92e91d3cce271d48ae1c (diff)
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
Diffstat (limited to 'lib/stm32/f1/libopencm3_stm32f1.ld')
-rw-r--r--lib/stm32/f1/libopencm3_stm32f1.ld26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/stm32/f1/libopencm3_stm32f1.ld b/lib/stm32/f1/libopencm3_stm32f1.ld
index 0624b96..e2f1bd1 100644
--- a/lib/stm32/f1/libopencm3_stm32f1.ld
+++ b/lib/stm32/f1/libopencm3_stm32f1.ld
@@ -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
- _etext = .;
+ . = ORIGIN(ram);
- .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 = .;
}