summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/ec.lds.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 90ba292c5b..bbf9a7df01 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -279,6 +279,18 @@ SECTIONS
__data_lma_start = .;
+#ifdef CONFIG_PRESERVE_LOGS
+ .preserve_logs(NOLOAD) : {
+ . = ALIGN(8);
+ *(SORT(.preserved_logs.*))
+ . = ALIGN(8);
+ __preserved_logs_end = .;
+ } > IRAM
+
+ ASSERT((SIZEOF(.preserve_logs) + CONFIG_RAM_BASE) ==
+ __preserved_logs_end, "preserve_logs must be at CONFIG_RAM_BASE.")
+#endif
+
.bss : {
/*
* Align to 512 bytes. This is convenient when some memory block