ldscripts: move .noinit section behind .bss section
If the .noinit section starts at the beginning of the RAM, a bootloader that is unaware of it will clear it. Instead, move it behind the .bss section, hoping that a bootloader will always use less .bss memory than RIOT proper.
This commit is contained in:
parent
1a3e1590d3
commit
1c3f96495d
@ -127,17 +127,6 @@ SECTIONS
|
||||
_erelocate = .;
|
||||
} > ram AT> rom
|
||||
|
||||
/*
|
||||
* collect all uninitialized sections that go into RAM
|
||||
*/
|
||||
.noinit (NOLOAD) :
|
||||
{
|
||||
__noinit_start = .;
|
||||
*(.noinit)
|
||||
. = ALIGN(4);
|
||||
__noinit_end = .;
|
||||
} > ram
|
||||
|
||||
/* .bss section which is used for uninitialized data */
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
@ -151,6 +140,17 @@ SECTIONS
|
||||
_ezero = .;
|
||||
} > ram
|
||||
|
||||
/*
|
||||
* collect all uninitialized sections that go into RAM
|
||||
*/
|
||||
.noinit (NOLOAD) :
|
||||
{
|
||||
__noinit_start = .;
|
||||
*(.noinit)
|
||||
. = ALIGN(4);
|
||||
__noinit_end = .;
|
||||
} > ram
|
||||
|
||||
/* heap section */
|
||||
. = ALIGN(4);
|
||||
_sheap = . ;
|
||||
|
||||
@ -154,19 +154,6 @@ SECTIONS
|
||||
end_dtors = .;
|
||||
} >ram
|
||||
|
||||
/*
|
||||
* collect all uninitialized sections that go into RAM
|
||||
*/
|
||||
.noinit (NOLOAD) :
|
||||
{
|
||||
__noinit_start = .;
|
||||
PROVIDE(__fiq_handler = .);
|
||||
*(.fiq)
|
||||
*(.noinit)
|
||||
} > ram
|
||||
. = ALIGN(4);
|
||||
__noinit_end = .;
|
||||
|
||||
/*
|
||||
* collect all zero initialized sections that go into RAM
|
||||
*/
|
||||
@ -213,6 +200,18 @@ SECTIONS
|
||||
. = ALIGN(4); /* ensure data is aligned so relocation can use 4-byte operations */
|
||||
_edata = .; /* define a global symbol marking the end of the .data section */
|
||||
|
||||
/*
|
||||
* collect all uninitialized sections that go into RAM
|
||||
*/
|
||||
.noinit (NOLOAD) :
|
||||
{
|
||||
__noinit_start = .;
|
||||
PROVIDE(__fiq_handler = .);
|
||||
*(.fiq)
|
||||
*(.noinit)
|
||||
} > ram
|
||||
. = ALIGN(4);
|
||||
__noinit_end = .;
|
||||
|
||||
/*
|
||||
* Exception frames (newer linker versions generate these but they use of
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user