]> git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/interpose-multiple/foo2.c
dyld-733.8.tar.gz
[apple/dyld.git] / unit-tests / test-cases / interpose-multiple / foo2.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 int (*p1)() = &base1;
8
9 __attribute__((constructor))
10 void myinit()
11 {
12 if ( (*p1)() == 10 )
13 PASS("interpose-multiple");
14 else
15 FAIL("interpose-multiple");
16 }
17
18
19 int mybase2()
20 {
21 return 20;
22 }
23
24
25 DYLD_INTERPOSE(mybase2, base2)