summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-03-23 02:17:04 -0700
committerKeith Packard <keithp@keithp.com>2013-03-23 02:17:04 -0700
commit74975d1ff48c03140048d796f4276aebf4c29984 (patch)
treeffe86c3eaf32413745874db38f89b21e3e07c173 /src
parenta0009bffa4c8d98b7f41659473ba1130145125db (diff)
altos: Mark .boot section as (NOLOAD)
For some reason, the silly linker marks things in section .boot as data rather than bss, so they'd end up initialized by default. Force them to be NOLOAD so they preserve values across reboot so that boot chaining works properly. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/stm/altos-application.ld6
-rw-r--r--src/stm/altos-loader.ld2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/stm/altos-application.ld b/src/stm/altos-application.ld
index 5110da84..5bdfcd05 100644
--- a/src/stm/altos-application.ld
+++ b/src/stm/altos-application.ld
@@ -45,14 +45,14 @@ SECTIONS {
.ARM.exidx : {
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
- __text_end__ = .;
} > rom
+ __text_end__ = .;
/* Boot data which must live at the start of ram so that
* the application and bootloader share the same addresses.
* This must be all uninitialized data
*/
- .boot : {
+ .boot (NOLOAD) : {
__boot_start__ = .;
*(.boot)
. = ALIGN(4);
@@ -64,6 +64,7 @@ SECTIONS {
.data : {
__data_start__ = .;
*(.data) /* initialized data */
+ . = ALIGN(4);
__data_end__ = .;
} >ram AT>rom
@@ -71,6 +72,7 @@ SECTIONS {
__bss_start__ = .;
*(.bss)
*(COMMON)
+ . = ALIGN(4);
__bss_end__ = .;
} >ram
diff --git a/src/stm/altos-loader.ld b/src/stm/altos-loader.ld
index 2e36dce9..7184b96c 100644
--- a/src/stm/altos-loader.ld
+++ b/src/stm/altos-loader.ld
@@ -52,7 +52,7 @@ SECTIONS {
* the application and bootloader share the same addresses.
* This must be all uninitialized data
*/
- .boot : {
+ .boot (NOLOAD) : {
__boot_start__ = .;
*(.boot)
. = ALIGN(4);