diff options
author | 2019-06-08 11:00:11 +0000 | |
---|---|---|
committer | 2019-06-08 11:00:11 +0000 | |
commit | 8a6e9f1ddcc57010dfa1f247aacb2cf67e110211 (patch) | |
tree | bea5798ef6ca4d6cf68773e9ac3b26b0f0514aa8 | |
parent | 61709d09d65c9b321de247d59a5931cc8d457735 (diff) | |
parent | f9b14ce9a35c8f25cd702db0df7bd5318a158a57 (diff) | |
download | cortex-m-8a6e9f1ddcc57010dfa1f247aacb2cf67e110211.tar.gz cortex-m-8a6e9f1ddcc57010dfa1f247aacb2cf67e110211.tar.zst cortex-m-8a6e9f1ddcc57010dfa1f247aacb2cf67e110211.zip |
Merge #190
190: Align sections r=korken89 a=NickeZ
Hey, I had the same issue as in #189. Don't ask me why this works I looked at other linker scripts.
Fixes #189
Co-authored-by: Niklas Claesson <nicke.claesson@gmail.com>
-rw-r--r-- | cortex-m-rt/link.x.in | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in index e1ec00e..7a31928 100644 --- a/cortex-m-rt/link.x.in +++ b/cortex-m-rt/link.x.in @@ -105,14 +105,13 @@ SECTIONS /* ### .data */ .data : ALIGN(4) { + . = ALIGN(4); + __sdata = .; *(.data .data.*); - . = ALIGN(4); /* 4-byte align the end (VMA) of this section */ + __edata = .; } > RAM AT > FLASH - /* VMA of .data */ - __sdata = ADDR(.data); - __edata = ADDR(.data) + SIZEOF(.data); /* LMA of .data */ __sidata = LOADADDR(.data); @@ -120,16 +119,16 @@ SECTIONS /* ### .bss */ .bss : ALIGN(4) { + . = ALIGN(4); + __sbss = .; *(.bss .bss.*); - . = ALIGN(4); /* 4-byte align the end (VMA) of this section */ + __ebss = .; } > RAM - __sbss = ADDR(.bss); - __ebss = ADDR(.bss) + SIZEOF(.bss); - /* Place the heap right after `.bss` */ - __sheap = ADDR(.bss) + SIZEOF(.bss); + . = ALIGN(4); + __sheap = .; /* ## .got */ /* Dynamic relocations are unsupported. This section is only used to detect relocatable code in |