1 | #include <unistd.h> |
---|---|
2 | |
3 | void init (void) __attribute__ ((constructor)); |
4 | void |
5 | __attribute__ ((constructor)) |
6 | init (void) |
7 | { |
8 | write (fd: 1, buf: "4", n: 1); |
9 | } |
10 | |
11 | void fini (void) __attribute__ ((destructor)); |
12 | void |
13 | __attribute__ ((destructor)) |
14 | fini (void) |
15 | { |
16 | write (fd: 1, buf: "5", n: 1); |
17 | } |
18 | |
19 | extern int dep1 (void); |
20 | |
21 | int |
22 | main (void) |
23 | { |
24 | return dep1 () != 42; |
25 | } |
26 |