Skip to content

Commit 1b7f7db

Browse files
committed
fix pre-commit and fix READONLY linker keyword with clang
1 parent a75daaf commit 1b7f7db

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

hw/bsp/stm32l4/boards/stm32l496nucleo/STM32L496XX_FLASH.ld

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ SECTIONS
102102
. = ALIGN(8);
103103
} >FLASH
104104

105-
.ARM.extab (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
106-
{
105+
.ARM.extab :
106+
{
107107
. = ALIGN(8);
108108
*(.ARM.extab* .gnu.linkonce.armextab.*)
109109
. = ALIGN(8);
110110
} >FLASH
111111

112-
.ARM (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
112+
.ARM :
113113
{
114114
. = ALIGN(8);
115115
__exidx_start = .;
@@ -118,16 +118,16 @@ SECTIONS
118118
. = ALIGN(8);
119119
} >FLASH
120120

121-
.preinit_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
121+
.preinit_array :
122122
{
123123
. = ALIGN(8);
124124
PROVIDE_HIDDEN (__preinit_array_start = .);
125125
KEEP (*(.preinit_array*))
126126
PROVIDE_HIDDEN (__preinit_array_end = .);
127127
. = ALIGN(8);
128128
} >FLASH
129-
130-
.init_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
129+
130+
.init_array :
131131
{
132132
. = ALIGN(8);
133133
PROVIDE_HIDDEN (__init_array_start = .);
@@ -137,7 +137,7 @@ SECTIONS
137137
. = ALIGN(8);
138138
} >FLASH
139139

140-
.fini_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
140+
.fini_array :
141141

142142
{
143143
. = ALIGN(8);
@@ -152,7 +152,7 @@ SECTIONS
152152
_sidata = LOADADDR(.data);
153153

154154
/* Initialized data sections goes into RAM, load LMA copy after code */
155-
.data :
155+
.data :
156156
{
157157
. = ALIGN(8);
158158
_sdata = .; /* create a global symbol at data start */
@@ -165,12 +165,12 @@ SECTIONS
165165
_edata = .; /* define a global symbol at data end */
166166
} >RAM AT> FLASH
167167

168-
168+
169169
/* Uninitialized data section */
170170
. = ALIGN(4);
171171
.bss :
172172
{
173-
/* This is used by the startup in order to initialize the .bss secion */
173+
/* This is used by the startup in order to initialize the .bss section */
174174
_sbss = .; /* define a global symbol at bss start */
175175
__bss_start__ = _sbss;
176176
*(.bss)
@@ -193,7 +193,7 @@ SECTIONS
193193
. = ALIGN(8);
194194
} >RAM
195195

196-
196+
197197

198198
/* Remove information from the standard libraries */
199199
/DISCARD/ :
@@ -204,5 +204,3 @@ SECTIONS
204204
}
205205

206206
}
207-
208-

0 commit comments

Comments
 (0)