NUMAKER_M252KG: 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.
pull/11874/head
Maciej Bocianski 2019-12-04 09:58:40 +01:00
parent 9aade4a816
commit f0dc4abb3f
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ WEAK_ALIAS_FUNC(OPA_IRQHandler, Default_Handler) // 62: OPA Interrupt
/* Vector table */
#if defined(__ARMCC_VERSION)
__attribute__ ((section("RESET")))
__attribute__ ((section("RESET"), used))
const uint32_t __vector_handlers[] = {
#elif defined(__ICCARM__)
extern uint32_t CSTACK$$Limit;