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