]>
Commit | Line | Data |
---|---|---|
2fd3f4e8 A |
1 | #include <stdio.h> |
2 | #include <string.h> | |
3 | #include <mach-o/dyld-interposing.h> | |
4 | #include "base.h" | |
5 | #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL() | |
6 | ||
7 | ||
8 | int (*p2)() = &base2; | |
9 | ||
10 | __attribute__((constructor)) | |
11 | void myinit() | |
12 | { | |
13 | if ( (*p2)() == 20 ) | |
14 | PASS("interpose-multiple"); | |
15 | else | |
16 | FAIL("interpose-multiple"); | |
17 | } | |
18 | ||
19 | ||
20 | int mybase1() | |
21 | { | |
22 | return 10; | |
23 | } | |
24 | ||
25 | ||
26 | DYLD_INTERPOSE(mybase1, base1) |