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