dyld-732.8.tar.gz
[apple/dyld.git] / testing / test-cases / symbol-resolver-basic.dtest / foo.c
1 #include <stdlib.h>
2
3
4 static int foo_ten()
5 {
6 return 10;
7 }
8
9 static int foo_zero()
10 {
11 return 0;
12 }
13
14
15 // This foo is a "resolver" function that return the actual address of "foo"
16 void* foo()
17 {
18 __asm__(".symbol_resolver _foo"); // magic until we have compiler support
19 #if TEN
20 return &foo_ten;
21 #else
22 return &foo_zero;
23 #endif
24 }
25
26