@@ -62,8 +62,8 @@ SECTIONS
62
62
.text :
63
63
{
64
64
. = ALIGN (4);
65
- *( .text) /* .text sections (code) */
66
- *( .text*) /* .text* sections (code) */
65
+ *SORT_BY_ALIGNMENT(SORT_BY_NAME( .text) ) /* .text sections (code) */
66
+ *SORT_BY_ALIGNMENT(SORT_BY_NAME( .text*) ) /* .text* sections (code) */
67
67
*(.rodata) /* .rodata sections (constants, strings, etc.) */
68
68
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
69
69
/* *(.glue_7) */ /* glue arm to thumb code */
@@ -73,14 +73,11 @@ SECTIONS
73
73
_etext = .; /* define a global symbol at end of code */
74
74
} >FLASH_FIRMWARE
75
75
76
- /* used by the startup to initialize data */
77
- _sidata = .;
78
-
79
76
/* This is the initialized data section
80
77
The program executes knowing that the data is in the RAM
81
78
but the loader puts the initial values in the FLASH (inidata).
82
79
It is one task of the startup to copy the initial values from FLASH to RAM. */
83
- .data : AT (_sidata)
80
+ .data :
84
81
{
85
82
. = ALIGN (4);
86
83
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
@@ -90,7 +87,10 @@ SECTIONS
90
87
91
88
. = ALIGN (4);
92
89
_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);
94
94
95
95
/* Zero-initialized data section */
96
96
.bss :
0 commit comments