Do not strip required symbols when LTO is on

Link time optimization was stripping off some symbols which were
accessed from assembly code.
This commit is contained in:
Gaurav Aggarwal 2019-05-09 22:04:29 +00:00
parent b6e5f96f0e
commit b9e379951a
36 changed files with 2535 additions and 80 deletions

View file

@ -305,7 +305,7 @@ void SysTick_Handler( void ) PRIVILEGED_FUNCTION;
/**
* @brief C part of SVC handler.
*/
void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVILEGED_FUNCTION;
portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVILEGED_FUNCTION;
/*-----------------------------------------------------------*/
/**
@ -319,7 +319,7 @@ static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
* @brief Saved as part of the task context to indicate which context the
* task is using on the secure side.
*/
volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT;
portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT;
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/
@ -523,7 +523,7 @@ uint32_t ulPreviousMask;
}
/*-----------------------------------------------------------*/
void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) /* PRIVILEGED_FUNCTION */
void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) /* PRIVILEGED_FUNCTION portDONT_DISCARD */
{
#if( configENABLE_MPU == 1 )
#if defined( __ARMCC_VERSION )