mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
cf1e1ddd4b
commit
5fdacc4fb3
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue