mirror of https://github.com/ARMmbed/mbed-os.git
component PSA: keep SVCHandler_main/tfm_pendsv_do_schedule symbol in LTO builds
Add a "used" attribute to SVCHandler_main/tfm_pendsv_do_schedule to fix ARMC6 build with the "-flto" flag. This attribute, attached to a function/variable, means that code must be emitted for the function even if it appears that the function is not referenced.pull/11874/head
parent
e3b8514a91
commit
57ac6c83d6
|
|
@ -27,6 +27,7 @@
|
|||
#include "region_defs.h"
|
||||
#include "tfm_nspm.h"
|
||||
#include "tfm_memory_utils.h"
|
||||
#include "platform/mbed_toolchain.h"
|
||||
|
||||
/*
|
||||
* IPC partitions.
|
||||
|
|
@ -580,7 +581,7 @@ void tfm_spm_init(void)
|
|||
tfm_thrd_start_scheduler(&this_thrd);
|
||||
}
|
||||
|
||||
void tfm_pendsv_do_schedule(struct tfm_state_context_ext *ctxb)
|
||||
MBED_USED void tfm_pendsv_do_schedule(struct tfm_state_context_ext *ctxb)
|
||||
{
|
||||
#if TFM_LVL == 2
|
||||
struct spm_partition_desc_t *p_next_partition;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include <stdbool.h>
|
||||
#include "tfm_svcalls.h"
|
||||
#endif
|
||||
#include "platform/mbed_toolchain.h"
|
||||
|
||||
/* This SVC handler is called when a secure partition requests access to a
|
||||
* buffer area
|
||||
|
|
@ -135,7 +136,7 @@ __attribute__((naked)) void SVC_Handler(void)
|
|||
#error "Unsupported ARM Architecture."
|
||||
#endif
|
||||
|
||||
uint32_t SVCHandler_main(uint32_t *svc_args, uint32_t lr)
|
||||
MBED_USED uint32_t SVCHandler_main(uint32_t *svc_args, uint32_t lr)
|
||||
{
|
||||
uint8_t svc_number;
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue