@@ -181,36 +181,14 @@ SECTIONS {
181
181
_app_smem_rom_start = LOADADDR (_APP_SMEM_SECTION_NAME);
182
182
#endif /* CONFIG_USERSPACE */
183
183
184
- SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),) {
185
- MPU_MIN_SIZE_ALIGN
186
- /*
187
- * For performance, BSS section is assumed to be 4 byte aligned and
188
- * a multiple of 4 bytes
189
- */
190
- . = ALIGN (4);
191
- __bss_start = .;
192
- __kernel_ram_start = .;
193
- *(".bss")
194
- *(".bss.*")
195
- *(COMMON)
196
- *(".kernel_bss.*")
197
-
198
- /*
199
- * BSP clears this memory in words only and doesn't clear any
200
- * potential left over bytes.
201
- */
202
- __bss_end = ALIGN (4);
203
- } GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
204
-
205
- #include <zephyr/linker/common-noinit.ld>
206
-
207
184
GROUP_START(DATA_REGION)
208
185
209
186
SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,) {
210
187
211
188
/* when XIP, .text is in ROM, but vector table must be at start of .data */
212
189
__data_region_start = .;
213
190
__data_start = .;
191
+ __kernel_ram_start = .;
214
192
*(".data")
215
193
*(".data.*")
216
194
*(".kernel.*")
@@ -245,6 +223,28 @@ SECTIONS {
245
223
246
224
__data_region_end = .;
247
225
226
+ SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),) {
227
+ MPU_MIN_SIZE_ALIGN
228
+ /*
229
+ * For performance, BSS section is assumed to be 4 byte aligned and
230
+ * a multiple of 4 bytes
231
+ */
232
+ . = ALIGN (4);
233
+ __bss_start = .;
234
+ *(".bss")
235
+ *(".bss.*")
236
+ *(COMMON)
237
+ *(".kernel_bss.*")
238
+
239
+ /*
240
+ * BSP clears this memory in words only and doesn't clear any
241
+ * potential left over bytes.
242
+ */
243
+ __bss_end = ALIGN (4);
244
+ } GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
245
+
246
+ #include <zephyr/linker/common-noinit.ld>
247
+
248
248
MPU_MIN_SIZE_ALIGN
249
249
/* Define linker symbols */
250
250
0 commit comments