]>
Commit | Line | Data |
---|---|---|
39a8cd10 A |
1 | |
2 | #include <stdio.h> | |
3 | ||
4 | int foo() | |
5 | { | |
6 | printf("foo\n"); | |
7 | return 1; | |
8 | } | |
9 | int bar() { return 1; } | |
10 | ||
11 | ||
12 | static __attribute__((constructor)) void foo_init() | |
13 | { | |
14 | printf("foo_init\n"); | |
15 | } | |
16 | ||
17 | static __attribute__((destructor)) void foo_term() | |
18 | { | |
19 | printf("foo_term\n"); | |
20 | } | |
21 |