diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/ec.lds.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index f778ca8f88..9fe53747b2 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -223,8 +223,10 @@ SECTIONS *(.bss.system_stack) /* Rest of .bss takes care of its own alignment */ *(.bss) +#ifdef CONFIG_REPLACE_LOADER_WITH_BSS_SLOW . = ALIGN(4); __bss_end = .; +#endif /* defined(CONFIG_REPLACE_LOADER_WITH_BSS_SLOW) */ } > IRAM .bss.slow : { @@ -233,6 +235,12 @@ SECTIONS #ifdef CONFIG_REPLACE_LOADER_WITH_BSS_SLOW } > LDR_REGION #else + /* + * Not replacing the loader, so .bss.slow is part of .bss. It needs to + * be followed by __bss_end so that .bss.slow will be zeroed by init. + */ + . = ALIGN(4); + __bss_end = .; } > IRAM #endif /* defined(CONFIG_REPLACE_LOADER_WITH_BSS_SLOW) */ |