Skip to content

Commit 8a6e9f1

Browse files
bors[bot]NickeZ
andcommitted
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 <[email protected]>
2 parents 61709d0 + f9b14ce commit 8a6e9f1

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

cortex-m-rt/link.x.in

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,31 +105,30 @@ SECTIONS
105105
/* ### .data */
106106
.data : ALIGN(4)
107107
{
108+
. = ALIGN(4);
109+
__sdata = .;
108110
*(.data .data.*);
109-
110111
. = ALIGN(4); /* 4-byte align the end (VMA) of this section */
112+
__edata = .;
111113
} > RAM AT > FLASH
112114

113-
/* VMA of .data */
114-
__sdata = ADDR(.data);
115-
__edata = ADDR(.data) + SIZEOF(.data);
116115

117116
/* LMA of .data */
118117
__sidata = LOADADDR(.data);
119118

120119
/* ### .bss */
121120
.bss : ALIGN(4)
122121
{
122+
. = ALIGN(4);
123+
__sbss = .;
123124
*(.bss .bss.*);
124-
125125
. = ALIGN(4); /* 4-byte align the end (VMA) of this section */
126+
__ebss = .;
126127
} > RAM
127128

128-
__sbss = ADDR(.bss);
129-
__ebss = ADDR(.bss) + SIZEOF(.bss);
130-
131129
/* Place the heap right after `.bss` */
132-
__sheap = ADDR(.bss) + SIZEOF(.bss);
130+
. = ALIGN(4);
131+
__sheap = .;
133132

134133
/* ## .got */
135134
/* Dynamic relocations are unsupported. This section is only used to detect relocatable code in

0 commit comments

Comments
 (0)