Skip to content

Commit cf1e1dd

Browse files
EV_COG_AD4050LZ: keep IVT_NAME/blank_checksum symbols in LTO builds
Add a "used" attribute to IVT_NAME/blank_checksum 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 12261ed commit cf1e1dd

File tree

1 file changed

+8
-1
lines changed
  • targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TARGET_EV_COG_AD4050LZ/device

1 file changed

+8
-1
lines changed

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TARGET_EV_COG_AD4050LZ/device/startup_ADuCM4050.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ extern void SramInit(void);
6060
Checksum options
6161
*----------------------------------------------------------------------------*/
6262

63-
#if defined(__ICCARM__)
63+
#if defined( __ICCARM__)
6464
__root
65+
#else
66+
__attribute__((used))
6567
#endif
6668
const uint32_t SECTION_PLACE(blank_checksum[],".checksum") =
6769
{
@@ -144,6 +146,11 @@ WEAK_FUNCTION( Root_Clk_Err_Handler )
144146
/*----------------------------------------------------------------------------
145147
Exception / Interrupt Vector table
146148
*----------------------------------------------------------------------------*/
149+
#if defined( __ICCARM__)
150+
__root
151+
#else
152+
__attribute__((used))
153+
#endif
147154
const pFunc SECTION_PLACE(IVT_NAME[104],VECTOR_SECTION) = {
148155
(pFunc) INITIAL_SP, /* Initial Stack Pointer */
149156
ADUCM4050_VECTORS

0 commit comments

Comments
 (0)