Skip to content

Commit 7812526

Browse files
authored
Merge pull request #338 from rlcamp/ltofix
Prevent LTO from omitting the ISR vector table
2 parents 024eaa5 + 7ca484a commit 7812526

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/arduino/cortex_handlers.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ extern uint32_t __bss_end__;
196196
extern uint32_t __StackTop;
197197

198198
/* Exception Table */
199+
__attribute__ ((used))
199200
__attribute__ ((section(".isr_vector"))) const DeviceVectors exception_table =
200201
{
201202
/* Configure Initial Stack Pointer, using linker-generated symbols */
@@ -407,6 +408,7 @@ extern uint32_t __bss_end__;
407408
extern uint32_t __StackTop;
408409

409410
/* Exception Table */
411+
__attribute__ ((used))
410412
__attribute__ ((section(".isr_vector"))) const DeviceVectors exception_table =
411413
{
412414
/* Configure Initial Stack Pointer, using linker-generated symbols */

0 commit comments

Comments
 (0)