aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2013-03-19 17:44:53 +0100
committerNicolas Schodet2013-03-19 17:47:18 +0100
commit48e654ea14d9f7c8c80ba2d089624277c10c604c (patch)
tree6741f6ecb0e81ed8dd02219b6f657049948fa5f3
parent5b8953124e8c00cdf05169de6e304834cefacf63 (diff)
Synchronise linker scripts which are supposed to be identical
This also report bug fixes about data alignment and bss storage to EFM32 & LM3S targets. Note: removed chrysn copyright statement as the file is a verbatim copy of previous files.
-rw-r--r--lib/efm32/efm32g/libopencm3_efm32g.ld38
-rw-r--r--lib/efm32/efm32gg/libopencm3_efm32gg.ld38
-rw-r--r--lib/efm32/efm32lg/libopencm3_efm32lg.ld38
-rw-r--r--lib/efm32/efm32tg/libopencm3_efm32tg.ld38
-rw-r--r--lib/lm3s/libopencm3_lm3s.ld2
5 files changed, 84 insertions, 70 deletions
diff --git a/lib/efm32/efm32g/libopencm3_efm32g.ld b/lib/efm32/efm32g/libopencm3_efm32g.ld
index 8ef5e42..b18da7f 100644
--- a/lib/efm32/efm32g/libopencm3_efm32g.ld
+++ b/lib/efm32/efm32g/libopencm3_efm32g.ld
@@ -1,8 +1,7 @@
/*
* This file is part of the libopencm3 project.
*
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>,
- * Copyright (C) 2012 chrysn <chrysn@fsfe.org>
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,7 +14,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
+ * along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* Generic linker script for EFM32 targets using libopencm3. */
@@ -31,33 +30,44 @@ ENTRY(reset_handler)
/* Define sections. */
SECTIONS
{
- . = ORIGIN(rom);
-
.text : {
*(.vectors) /* Vector table */
*(.text*) /* Program code */
. = ALIGN(4);
*(.rodata*) /* Read-only data */
. = ALIGN(4);
- _etext = .;
} >rom
- . = ORIGIN(ram);
+ /*
+ * Another section used by C++ stuff, appears when using newlib with
+ * 64bit (long long) printf support
+ */
+ .ARM.extab : {
+ *(.ARM.extab*)
+ } >rom
+ .ARM.exidx : {
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ } >rom
+
+ . = ALIGN(4);
+ _etext = .;
- .data : AT(_etext) {
+ .data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
- } >ram
+ } >ram AT >rom
+ _data_loadaddr = LOADADDR(.data);
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
- } >ram AT >rom
- _data_loadaddr = LOADADDR(.data);
+ } >ram
/*
* The .eh_frame section appears to be used for C++ exception handling.
@@ -65,12 +75,6 @@ SECTIONS
*/
/DISCARD/ : { *(.eh_frame) }
- /*
- * Another section used by C++ stuff, appears when using newlib with
- * 64bit (long long) printf support - discard it for now.
- */
- /DISCARD/ : { *(.ARM.exidx) }
-
. = ALIGN(4);
end = .;
}
diff --git a/lib/efm32/efm32gg/libopencm3_efm32gg.ld b/lib/efm32/efm32gg/libopencm3_efm32gg.ld
index 8ef5e42..b18da7f 100644
--- a/lib/efm32/efm32gg/libopencm3_efm32gg.ld
+++ b/lib/efm32/efm32gg/libopencm3_efm32gg.ld
@@ -1,8 +1,7 @@
/*
* This file is part of the libopencm3 project.
*
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>,
- * Copyright (C) 2012 chrysn <chrysn@fsfe.org>
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,7 +14,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
+ * along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* Generic linker script for EFM32 targets using libopencm3. */
@@ -31,33 +30,44 @@ ENTRY(reset_handler)
/* Define sections. */
SECTIONS
{
- . = ORIGIN(rom);
-
.text : {
*(.vectors) /* Vector table */
*(.text*) /* Program code */
. = ALIGN(4);
*(.rodata*) /* Read-only data */
. = ALIGN(4);
- _etext = .;
} >rom
- . = ORIGIN(ram);
+ /*
+ * Another section used by C++ stuff, appears when using newlib with
+ * 64bit (long long) printf support
+ */
+ .ARM.extab : {
+ *(.ARM.extab*)
+ } >rom
+ .ARM.exidx : {
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ } >rom
+
+ . = ALIGN(4);
+ _etext = .;
- .data : AT(_etext) {
+ .data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
- } >ram
+ } >ram AT >rom
+ _data_loadaddr = LOADADDR(.data);
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
- } >ram AT >rom
- _data_loadaddr = LOADADDR(.data);
+ } >ram
/*
* The .eh_frame section appears to be used for C++ exception handling.
@@ -65,12 +75,6 @@ SECTIONS
*/
/DISCARD/ : { *(.eh_frame) }
- /*
- * Another section used by C++ stuff, appears when using newlib with
- * 64bit (long long) printf support - discard it for now.
- */
- /DISCARD/ : { *(.ARM.exidx) }
-
. = ALIGN(4);
end = .;
}
diff --git a/lib/efm32/efm32lg/libopencm3_efm32lg.ld b/lib/efm32/efm32lg/libopencm3_efm32lg.ld
index 8ef5e42..b18da7f 100644
--- a/lib/efm32/efm32lg/libopencm3_efm32lg.ld
+++ b/lib/efm32/efm32lg/libopencm3_efm32lg.ld
@@ -1,8 +1,7 @@
/*
* This file is part of the libopencm3 project.
*
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>,
- * Copyright (C) 2012 chrysn <chrysn@fsfe.org>
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,7 +14,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
+ * along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* Generic linker script for EFM32 targets using libopencm3. */
@@ -31,33 +30,44 @@ ENTRY(reset_handler)
/* Define sections. */
SECTIONS
{
- . = ORIGIN(rom);
-
.text : {
*(.vectors) /* Vector table */
*(.text*) /* Program code */
. = ALIGN(4);
*(.rodata*) /* Read-only data */
. = ALIGN(4);
- _etext = .;
} >rom
- . = ORIGIN(ram);
+ /*
+ * Another section used by C++ stuff, appears when using newlib with
+ * 64bit (long long) printf support
+ */
+ .ARM.extab : {
+ *(.ARM.extab*)
+ } >rom
+ .ARM.exidx : {
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ } >rom
+
+ . = ALIGN(4);
+ _etext = .;
- .data : AT(_etext) {
+ .data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
- } >ram
+ } >ram AT >rom
+ _data_loadaddr = LOADADDR(.data);
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
- } >ram AT >rom
- _data_loadaddr = LOADADDR(.data);
+ } >ram
/*
* The .eh_frame section appears to be used for C++ exception handling.
@@ -65,12 +75,6 @@ SECTIONS
*/
/DISCARD/ : { *(.eh_frame) }
- /*
- * Another section used by C++ stuff, appears when using newlib with
- * 64bit (long long) printf support - discard it for now.
- */
- /DISCARD/ : { *(.ARM.exidx) }
-
. = ALIGN(4);
end = .;
}
diff --git a/lib/efm32/efm32tg/libopencm3_efm32tg.ld b/lib/efm32/efm32tg/libopencm3_efm32tg.ld
index 8ef5e42..b18da7f 100644
--- a/lib/efm32/efm32tg/libopencm3_efm32tg.ld
+++ b/lib/efm32/efm32tg/libopencm3_efm32tg.ld
@@ -1,8 +1,7 @@
/*
* This file is part of the libopencm3 project.
*
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>,
- * Copyright (C) 2012 chrysn <chrysn@fsfe.org>
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,7 +14,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
+ * along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* Generic linker script for EFM32 targets using libopencm3. */
@@ -31,33 +30,44 @@ ENTRY(reset_handler)
/* Define sections. */
SECTIONS
{
- . = ORIGIN(rom);
-
.text : {
*(.vectors) /* Vector table */
*(.text*) /* Program code */
. = ALIGN(4);
*(.rodata*) /* Read-only data */
. = ALIGN(4);
- _etext = .;
} >rom
- . = ORIGIN(ram);
+ /*
+ * Another section used by C++ stuff, appears when using newlib with
+ * 64bit (long long) printf support
+ */
+ .ARM.extab : {
+ *(.ARM.extab*)
+ } >rom
+ .ARM.exidx : {
+ __exidx_start = .;
+ *(.ARM.exidx*)
+ __exidx_end = .;
+ } >rom
+
+ . = ALIGN(4);
+ _etext = .;
- .data : AT(_etext) {
+ .data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
- } >ram
+ } >ram AT >rom
+ _data_loadaddr = LOADADDR(.data);
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
- } >ram AT >rom
- _data_loadaddr = LOADADDR(.data);
+ } >ram
/*
* The .eh_frame section appears to be used for C++ exception handling.
@@ -65,12 +75,6 @@ SECTIONS
*/
/DISCARD/ : { *(.eh_frame) }
- /*
- * Another section used by C++ stuff, appears when using newlib with
- * 64bit (long long) printf support - discard it for now.
- */
- /DISCARD/ : { *(.ARM.exidx) }
-
. = ALIGN(4);
end = .;
}
diff --git a/lib/lm3s/libopencm3_lm3s.ld b/lib/lm3s/libopencm3_lm3s.ld
index 4aaf4d9..ceb391a 100644
--- a/lib/lm3s/libopencm3_lm3s.ld
+++ b/lib/lm3s/libopencm3_lm3s.ld
@@ -77,8 +77,6 @@ SECTIONS
. = ALIGN(4);
end = .;
- _end = .;
- __end = .;
}
PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram));