diff --git a/cpu/cortexm_common/ldscripts/cortexm_base.ld b/cpu/cortexm_common/ldscripts/cortexm_base.ld index 6865e913bce0d3fed495e20ca0b870a3dd42d690..5165aa088f55d8aed6f26fd70a4eec1cf918448f 100644 --- a/cpu/cortexm_common/ldscripts/cortexm_base.ld +++ b/cpu/cortexm_common/ldscripts/cortexm_base.ld @@ -101,6 +101,16 @@ SECTIONS . = ALIGN(4); _etext = .; + /* stack section */ + .stack (NOLOAD): + { + . = ALIGN(8); + _sstack = .; + KEEP (*(.isr_stack)) + . = ALIGN(8); + _estack = .; + } > ram + .relocate : AT (_etext) { . = ALIGN(4); @@ -124,16 +134,6 @@ SECTIONS _ezero = .; } > ram - /* stack section */ - .stack (NOLOAD): - { - . = ALIGN(8); - _sstack = .; - KEEP (*(.isr_stack)) - . = ALIGN(8); - _estack = .; - } > ram - /* heap section */ . = ALIGN(4); _sheap = . ;