nrf: linker: add a new .uninitialized section

This section immediately follows the .bss section, and is designed to
contain uninitialized variables that should persist across reboots.

The section is placed directly after .bss, under the theory that the
size of Circuit Python's .bss + .data is bigger than the bootloader's
.bss + .data, so there is less likely to be a conflict.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-05-18 11:43:21 +08:00
parent 2314f988b1
commit f002c784c0

View File

@ -103,7 +103,7 @@ SECTIONS
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
} >RAM
/* Uninitialized data section */
/* Zero-initialized data section */
.bss :
{
. = ALIGN(4);
@ -116,6 +116,19 @@ SECTIONS
_ebss = .; /* define a global symbol at bss end; used by startup code and GC */
} >RAM
/* Uninitialized data section
Data placed into this section will remain unchanged across reboots. */
.uninitialized (NOLOAD) :
{
. = ALIGN(4);
_suninitialized = .; /* define a global symbol at uninitialized start; currently unused */
*(.uninitialized)
*(.uninitialized*)
. = ALIGN(4);
_euninitialized = .; /* define a global symbol at uninitialized end; currently unused */
} >RAM
/* this is to define the start of the heap, and make sure we have a minimum size */
.heap :
{