]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/interpose-then-dlopen.dtest/foo.c
dyld-733.6.tar.gz
[apple/dyld.git] / testing / test-cases / interpose-then-dlopen.dtest / foo.c
1
2 #include <stdlib.h>
3 #include <mach-o/dyld-interposing.h>
4
5 extern int interposableFoo();
6 int (*pFoo)() = &interposableFoo;
7
8 int callFoo()
9 {
10 return (*pFoo)();
11 }
12
13 extern int interposableBar();
14
15 int myBar() {
16 return 2;
17 }
18
19 int (*pBar)() = &myBar;
20
21 int callBar()
22 {
23 return (*pBar)();
24 }
25
26 DYLD_INTERPOSE(myBar, interposableBar)