2 * Copyright (C) 2023 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
12 /* Use tracepoints defined and provided by shared libraries. */
13 void test_constructor_so(void) __attribute__((constructor
));
14 void test_constructor_so(void)
16 tracepoint(tp_so
, constructor_c_provider_shared_library
);
19 void test_destructor_so(void) __attribute__((destructor
));
20 void test_destructor_so(void)
22 tracepoint(tp_so
, destructor_c_provider_shared_library
);
25 Objso
g_objso_shared_library("global - shared library define and provider");
27 /* Use tracepoints defined and provided by static archive. */
28 void test_constructor_a(void) __attribute__((constructor
));
29 void test_constructor_a(void)
31 tracepoint(tp_a
, constructor_c_provider_static_archive
);
34 void test_destructor_a(void) __attribute__((destructor
));
35 void test_destructor_a(void)
37 tracepoint(tp_a
, destructor_c_provider_static_archive
);
40 Obja
g_obja_static_archive("global - static archive define and provider");
44 Obj
l_obj("main() local");
45 Objso
l_objso("main() local - shared library define and provider");
46 Obja
l_obja("main() local - static archive define and provider");