Skip to content

Commit 9c4c3e1

Browse files
committed
Only sort .text for nrf
1 parent 0cffa6b commit 9c4c3e1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ports/nrf/boards/common.template.ld

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,32 +73,32 @@ SECTIONS
7373
_etext = .; /* define a global symbol at end of code */
7474
} >FLASH_FIRMWARE
7575

76-
/* used by the startup to initialize data */
77-
_sidata = .;
78-
7976
/* This is the initialized data section
8077
The program executes knowing that the data is in the RAM
8178
but the loader puts the initial values in the FLASH (inidata).
8279
It is one task of the startup to copy the initial values from FLASH to RAM. */
83-
.data : AT (_sidata)
80+
.data :
8481
{
8582
. = ALIGN(4);
8683
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
8784
_ram_start = .; /* create a global symbol at ram start for garbage collector */
88-
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.data)) /* .data sections */
89-
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*)) /* .data* sections */
85+
*(.data) /* .data sections */
86+
*(.data*) /* .data* sections */
9087

9188
. = ALIGN(4);
9289
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
93-
} >APP_RAM
90+
} >APP_RAM AT > FLASH_FIRMWARE
91+
92+
/* used by the startup to initialize data */
93+
_sidata = LOADADDR(.data);
9494

9595
/* Zero-initialized data section */
9696
.bss :
9797
{
9898
. = ALIGN(4);
9999
_sbss = .; /* define a global symbol at bss start; used by startup code */
100-
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss))
101-
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))
100+
*(.bss)
101+
*(.bss*)
102102
*(COMMON)
103103

104104
. = ALIGN(4);

0 commit comments

Comments
 (0)