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>
.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);
.data : {
__data_start__ = .;
*(.data) /* initialized data */
+ . = ALIGN(4);
__data_end__ = .;
} >ram AT>rom
__bss_start__ = .;
*(.bss)
*(COMMON)
+ . = ALIGN(4);
__bss_end__ = .;
} >ram
* the application and bootloader share the same addresses.
* This must be all uninitialized data
*/
- .boot : {
+ .boot (NOLOAD) : {
__boot_start__ = .;
*(.boot)
. = ALIGN(4);