Skip to content

Commit 9aade4a

Browse files
NUMAKER_IOT_M263A: keep __vector_handlers symbol in LTO builds
Add a "used" attribute to __vector_handlers 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 ec839f0 commit 9aade4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_NUVOTON/TARGET_M261/device/startup_M261.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ WEAK_ALIAS_FUNC(TRNG_IRQHandler, Default_Handler) // 101:
193193

194194
/* Vector table */
195195
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
196-
__attribute__ ((section("RESET")))
196+
__attribute__ ((section("RESET"), used))
197197
const uint32_t __vector_handlers[] = {
198198
#elif defined(__ICCARM__)
199199
extern uint32_t CSTACK$$Limit;

0 commit comments

Comments
 (0)