aboutsummaryrefslogtreecommitdiff
path: root/lib/stm32/f1/libopencm3_stm32f1.ld
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2012-04-25 17:34:07 +0200
committerPiotr Esden-Tempski2012-04-25 17:34:07 +0200
commit3596075ee0f189f8a95090c4fb5522844255a029 (patch)
tree4c0b6b1324460daadae718f917caa13b471e16be /lib/stm32/f1/libopencm3_stm32f1.ld
parent3b20a5e34e0c79a47fd774a7d68783476918861a (diff)
Fixed the linker scripts to be the way Tomaz Solc proposed.
Something went wrong when cherrypicking his commits in the pull request. Sorry about that. :(
Diffstat (limited to 'lib/stm32/f1/libopencm3_stm32f1.ld')
-rw-r--r--lib/stm32/f1/libopencm3_stm32f1.ld13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/stm32/f1/libopencm3_stm32f1.ld b/lib/stm32/f1/libopencm3_stm32f1.ld
index a794314..a64a1f7 100644
--- a/lib/stm32/f1/libopencm3_stm32f1.ld
+++ b/lib/stm32/f1/libopencm3_stm32f1.ld
@@ -38,6 +38,7 @@ SECTIONS
. = ALIGN(4);
*(.rodata*) /* Read-only data */
. = ALIGN(4);
+ _etext = .;
} >rom
/*
@@ -55,19 +56,25 @@ SECTIONS
. = ORIGIN(ram);
- .data : {
+ .data : AT (__exidx_end) {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
- } >ram AT >rom
+ } >ram
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
- } >ram
+ } >ram AT >rom
+
+ /*
+ * The .eh_frame section appears to be used for C++ exception handling.
+ * You may need to fix this if you're using C++.
+ */
+ /DISCARD/ : { *(.eh_frame) }
. = ALIGN(4);
end = .;