]> git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/interpose-multiple/foo1.c
067055995d0d67ffb088d04d84f3dc832d496a88
[apple/dyld.git] / unit-tests / test-cases / interpose-multiple / foo1.c
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)