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:
Ayke van Laethem 2018-02-11 01:09:12 +01:00 committed by Damien George
parent 4c011e66b4
commit f907139fab

View File

@ -32,13 +32,13 @@ SECTIONS
*/
/* used by the startup to initialize data */
_sidata = .;
_sidata = LOADADDR(.data);
/* This is the initialized data section
The program executes knowing that the data is in the RAM
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. */
.data : AT (_sidata)
.data :
{
. = ALIGN(4);
_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);
_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 */
.bss :