CC3220SF_LAUNCHXL: keep ulDebugHeader symbol in LTO builds

Add a "used" attribute to ulDebugHeader (placed in signature_section section)
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, 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:08:53 +01:00
parent 63d14f3af4
commit a761ec57fd
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ void CC3220SF_LAUNCHXL_initGeneral(void)
}
#if defined TOOLCHAIN_ARM
__attribute__((section("signature_section")))
__attribute__((section("signature_section"), used))
#elif defined TOOLCHAIN_IAR
#pragma default_variable_attributes = @ ".dbghdr"
#elif defined TOOLCHAIN_GCC_ARM