Skip to content

Commit 732a07b

Browse files
committed
fix linker issue with clang
1 parent 14124c1 commit 732a07b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

hw/bsp/stm32h7rs/boards/stm32h7s3nucleo/stm32h7s3xx_flash.ld

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,12 @@
3535
/* Entry Point */
3636
ENTRY(Reset_Handler)
3737

38-
/* Highest address of the user mode stack */
39-
_estack = ORIGIN(DTCM) + LENGTH(DTCM); /* end of "DTCM" Ram type memory */
40-
4138
_Min_Heap_Size = 0x200; /* required amount of heap */
4239
_Min_Stack_Size = 0x400; /* required amount of stack */
4340

4441
__FLASH_BEGIN = 0x08000000;
4542
__FLASH_SIZE = 0x00010000;
4643

47-
4844
__RAM_BEGIN = 0x24000000;
4945
__RAM_SIZE = 0x4FC00;
5046
__RAM_NONCACHEABLEBUFFER_SIZE = 0x4000;
@@ -63,6 +59,9 @@ MEMORY
6359
FLASH (xrw) : ORIGIN = __FLASH_BEGIN, LENGTH = __FLASH_SIZE
6460
}
6561

62+
/* Highest address of the user mode stack */
63+
_estack = ORIGIN(DTCM) + LENGTH(DTCM); /* end of "DTCM" Ram type memory */
64+
6665
/* Sections */
6766
SECTIONS
6867
{
@@ -100,14 +99,14 @@ SECTIONS
10099
. = ALIGN(4);
101100
} >FLASH
102101

103-
.ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
102+
.ARM.extab :
104103
{
105104
. = ALIGN(4);
106105
*(.ARM.extab* .gnu.linkonce.armextab.*)
107106
. = ALIGN(4);
108107
} >FLASH
109108

110-
.ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
109+
.ARM :
111110
{
112111
. = ALIGN(4);
113112
__exidx_start = .;
@@ -116,7 +115,7 @@ SECTIONS
116115
. = ALIGN(4);
117116
} >FLASH
118117

119-
.preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
118+
.preinit_array :
120119
{
121120
. = ALIGN(4);
122121
PROVIDE_HIDDEN (__preinit_array_start = .);
@@ -125,7 +124,7 @@ SECTIONS
125124
. = ALIGN(4);
126125
} >FLASH
127126

128-
.init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
127+
.init_array :
129128
{
130129
. = ALIGN(4);
131130
PROVIDE_HIDDEN (__init_array_start = .);
@@ -135,7 +134,7 @@ SECTIONS
135134
. = ALIGN(4);
136135
} >FLASH
137136

138-
.fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
137+
.fini_array :
139138
{
140139
. = ALIGN(4);
141140
PROVIDE_HIDDEN (__fini_array_start = .);

0 commit comments

Comments
 (0)