@@ -151,7 +151,7 @@ GCC linker script template:
151
151
#if !defined(MBED_BOOT_STACK_SIZE)
152
152
/* This value is normally defined by the tools
153
153
to 0x1000 for baremetal and 0x400 for RTOS */
154
- #define MBED_BOOT_STACK_SIZE 0x1000
154
+ #define MBED_BOOT_STACK_SIZE 0x400
155
155
#endif
156
156
157
157
/* Round up VECTORS_SIZE to 8 bytes */
@@ -234,49 +234,62 @@ SECTIONS
234
234
235
235
/* Location counter can end up 2byte aligned with narrow Thumb code but
236
236
__etext is assumed by startup code to be the LMA of a section in RAM
237
- which must be 4byte aligned */
238
- __etext = ALIGN (4 );
237
+ which must be 8-byte aligned */
238
+ __etext = ALIGN (8 );
239
239
240
240
.data : AT (__etext)
241
241
{
242
242
__data_start__ = .;
243
243
*(vtable)
244
244
*(.data*)
245
245
246
- . = ALIGN(4 );
246
+ . = ALIGN(8 );
247
247
/* preinit data */
248
248
PROVIDE_HIDDEN (__preinit_array_start = .);
249
249
KEEP(*(.preinit_array))
250
250
PROVIDE_HIDDEN (__preinit_array_end = .);
251
251
252
- . = ALIGN(4 );
252
+ . = ALIGN(8 );
253
253
/* init data */
254
254
PROVIDE_HIDDEN (__init_array_start = .);
255
255
KEEP(*(SORT(.init_array.*)))
256
256
KEEP(*(.init_array))
257
257
PROVIDE_HIDDEN (__init_array_end = .);
258
258
259
- . = ALIGN(4 );
259
+ . = ALIGN(8 );
260
260
/* finit data */
261
261
PROVIDE_HIDDEN (__fini_array_start = .);
262
262
KEEP(*(SORT(.fini_array.*)))
263
263
KEEP(*(.fini_array))
264
264
PROVIDE_HIDDEN (__fini_array_end = .);
265
265
266
266
KEEP(*(.jcr*))
267
- . = ALIGN(4 );
267
+ . = ALIGN(8 );
268
268
/* All data end */
269
269
__data_end__ = .;
270
270
271
271
} > RAM
272
272
273
+ /* Uninitialized data section
274
+ * This region is not initialized by the C/C++ library and can be used to
275
+ * store state across soft reboots. */
276
+ .uninitialized (NOLOAD):
277
+ {
278
+ . = ALIGN(32);
279
+ __uninitialized_start = .;
280
+ *(.uninitialized)
281
+ KEEP(*(.keep.uninitialized))
282
+ . = ALIGN(32);
283
+ __uninitialized_end = .;
284
+ } > RAM
285
+
273
286
.bss :
274
287
{
275
- . = ALIGN(4 );
288
+ . = ALIGN(8 );
276
289
__bss_start__ = .;
277
290
*(.bss*)
278
291
*(COMMON)
279
- . = ALIGN(4 );
292
+ . = ALIGN(8 );
280
293
__bss_end__ = .;
281
294
} > RAM
282
295
0 commit comments