xref: /optee_os/ldelf/asan.h (revision 4cafd8a3f88594ce06758c2a85b59c2d32a6ac7e)
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2026, Linutronix GmbH
4  */
5 
6 #ifndef __LDELF_ASAN_H
7 #define __LDELF_ASAN_H
8 
9 #include <asan.h>
10 #include <tee_api_defines.h>
11 
12 #ifdef CFG_CORE_SANITIZE_KADDRESS
13 
14 /* Provided by the linker script  */
15 extern const vaddr_t __init_array_start;
16 extern const vaddr_t __init_array_end;
17 extern char __end[], __text_start[];
18 
19 TEE_Result asan_init_ldelf(void);
20 #else
asan_init_ldelf(void)21 static inline TEE_Result asan_init_ldelf(void)
22 {
23 	return TEE_SUCCESS;
24 }
25 #endif
26 
27 #endif /*__LDELF_ASAN_H*/
28