MIMXRT1050_EVt: keep hyperflash_config/image_vector_table symbols in LTO builds

Add a "used" attribute to hyperflash_config/image_vector_table 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:35:14 +01:00
parent cf1e1ddd4b
commit 5fdacc4fb3
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@
******************************************************************************/
#if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1)
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__)
__attribute__((section(".boot_hdr.conf")))
__attribute__((section(".boot_hdr.conf"), used))
#elif defined(__ICCARM__)
#pragma location = ".boot_hdr.conf"
#endif

View File

@ -14,7 +14,7 @@
#if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1)
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__)
__attribute__((section(".boot_hdr.ivt")))
__attribute__((section(".boot_hdr.ivt"), used))
#elif defined(__ICCARM__)
#pragma location=".boot_hdr.ivt"
#endif