diff --git a/cpu/cortexm_common/ldscripts/cortexm_base.ld b/cpu/cortexm_common/ldscripts/cortexm_base.ld index 6865e913bc..5165aa088f 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 = . ;