Skip to content

Commit ec839f0

Browse files
MSP432_LAUNCHPAD: keep interruptVectors symbol in LTO builds
Add a "used" attribute to interruptVectors to fix ARMC6 build with the "-flto" flag. (Error: L6236E: No section matches selector - no section to be FIRST/LAST. ) This attribute, attached to a function/variable, means that code must be emitted for the function even if it appears that the function is not referenced.
1 parent 5fdacc4 commit ec839f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_TI/TARGET_MSP432/TARGET_MSP432P401R/device/startup_msp432p401r.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ WEAK_ALIAS_FUNC(EUSCIB3_SPI_IRQHandler, Default_Handler)
156156
// to ensure that it ends up at physical address 0x0000.0000 or at the start of the
157157
// program if located at a start address other than 0.
158158
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
159-
void (* const interruptVectors[])(void) __attribute__((section("RESET"))) = {
159+
void (* const interruptVectors[])(void) __attribute__((section("RESET"), used)) = {
160160
(pFunc) &Image$$ARM_LIB_STACK$$ZI$$Limit, // The initial stack pointer
161161
#elif defined(__ICCARM__)
162162
void (* const __vector_table[])(void) @ ".intvec" = {

0 commit comments

Comments
 (0)