hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// SPDX-License-Identifier: BSD-2-Clause
/*
 * Copyright (c) 2018, Linaro Limited
 */
 
#include "os_test_lib.h"
#include <tee_internal_api.h>
#include <trace.h>
 
extern int os_test_global;
 
static void __attribute__((constructor)) os_test_shlib_init(void)
{
   os_test_global *= 10;
   os_test_global += 2;
   DMSG("os_test_global=%d", os_test_global);
}
 
#if defined(WITH_TLS_TESTS)
__thread int os_test_shlib_tls_a;
__thread int os_test_shlib_tls_b = 123;
#endif
 
int os_test_shlib_add(int a, int b)
{
   return a + b;
}
 
void os_test_shlib_panic(void)
{
   TEE_Panic(0);
}