Skip to content

Commit a761ec5

Browse files
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.
1 parent 63d14f3 commit a761ec5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/TARGET_CC3220SF_LAUNCHXL/CC3220SF_LAUNCHXL.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ void CC3220SF_LAUNCHXL_initGeneral(void)
336336
}
337337

338338
#if defined TOOLCHAIN_ARM
339-
__attribute__((section("signature_section")))
339+
__attribute__((section("signature_section"), used))
340340
#elif defined TOOLCHAIN_IAR
341341
#pragma default_variable_attributes = @ ".dbghdr"
342342
#elif defined TOOLCHAIN_GCC_ARM

0 commit comments

Comments
 (0)