]> git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/non-lazy-weak/main.c
dyld-750.5.tar.gz
[apple/dyld.git] / unit-tests / test-cases / non-lazy-weak / main.c
1 #include <stdio.h> // fprintf(), NULL
2 #include <stdlib.h> // exit(), EXIT_SUCCESS
3 #include <dlfcn.h>
4
5 #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL()
6
7 // libfoo.dylib has a weak global variable that foo() returns
8
9 extern int foo();
10
11 int main()
12 {
13 if ( foo() == 10 )
14 PASS("non-lazy-weak");
15 else
16 FAIL("non-lazy-weak");
17 return EXIT_SUCCESS;
18 }
19
20