nrf/boards/common.ld: Avoid overflowing the .text region.
Similar commit to this one:
6e56e6269f
When .text + .data oveflow available flash, the linker may not show an
error. This change makes sure .data is included in the size calculation.
This commit is contained in:
parent
4c011e66b4
commit
f907139fab
|
@ -32,13 +32,13 @@ SECTIONS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* used by the startup to initialize data */
|
/* used by the startup to initialize data */
|
||||||
_sidata = .;
|
_sidata = LOADADDR(.data);
|
||||||
|
|
||||||
/* This is the initialized data section
|
/* This is the initialized data section
|
||||||
The program executes knowing that the data is in the RAM
|
The program executes knowing that the data is in the RAM
|
||||||
but the loader puts the initial values in the FLASH (inidata).
|
but the loader puts the initial values in the FLASH (inidata).
|
||||||
It is one task of the startup to copy the initial values from FLASH to RAM. */
|
It is one task of the startup to copy the initial values from FLASH to RAM. */
|
||||||
.data : AT (_sidata)
|
.data :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
|
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
|
||||||
|
@ -48,7 +48,7 @@ SECTIONS
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
|
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
|
||||||
} >RAM
|
} >RAM AT>FLASH_TEXT
|
||||||
|
|
||||||
/* Uninitialized data section */
|
/* Uninitialized data section */
|
||||||
.bss :
|
.bss :
|
||||||
|
|
Loading…
Reference in New Issue