mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 06:19:56 +00:00
fix(pubsub): make sure LTO doesn't garbage collect the handlers
We never directly reference the event handlers so they look like fair game to be garbage collected when building with LTO. Tell the compiler that we definitely need them and to leave them alone. Change-Id: Iac672ce85e20328d25acbc3f5e544ad157eebf48 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
This commit is contained in:
parent
3c72b2ab0b
commit
f8d2a0e5ca
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -73,7 +73,7 @@
|
|||
*/
|
||||
#define SUBSCRIBE_TO_EVENT(event, func) \
|
||||
extern pubsub_cb_t __cb_func_##func##event __pubsub_section(event); \
|
||||
pubsub_cb_t __cb_func_##func##event __pubsub_section(event) = (func)
|
||||
pubsub_cb_t __cb_func_##func##event __used __pubsub_section(event) = (func)
|
||||
|
||||
/*
|
||||
* Iterate over subscribed handlers for a defined event. 'event' is the name of
|
||||
|
|
Loading…
Add table
Reference in a new issue