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