mirror of https://github.com/ARMmbed/mbed-os.git
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.pull/11874/head
parent
12261edd2b
commit
cf1e1ddd4b
|
|
@ -60,8 +60,10 @@ extern void SramInit(void);
|
|||
Checksum options
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(__ICCARM__)
|
||||
#if defined( __ICCARM__)
|
||||
__root
|
||||
#else
|
||||
__attribute__((used))
|
||||
#endif
|
||||
const uint32_t SECTION_PLACE(blank_checksum[],".checksum") =
|
||||
{
|
||||
|
|
@ -144,6 +146,11 @@ WEAK_FUNCTION( Root_Clk_Err_Handler )
|
|||
/*----------------------------------------------------------------------------
|
||||
Exception / Interrupt Vector table
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined( __ICCARM__)
|
||||
__root
|
||||
#else
|
||||
__attribute__((used))
|
||||
#endif
|
||||
const pFunc SECTION_PLACE(IVT_NAME[104],VECTOR_SECTION) = {
|
||||
(pFunc) INITIAL_SP, /* Initial Stack Pointer */
|
||||
ADUCM4050_VECTORS
|
||||
|
|
|
|||
Loading…
Reference in New Issue