]>
git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/weak-coalesce-stubs/main.c
3 #include <stdlib.h> // exit(), EXIT_SUCCESS
5 #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL()
7 //<rdar://problem/7886402> Loading MH_DYLIB_STUB causing coalescable miscount
11 // try to load stub many times
12 for (int i
=0; i
< 10; ++i
) {
13 void* handle
= dlopen("libstub.dylib", RTLD_LAZY
);
14 if ( handle
!= NULL
) {
15 FAIL("weak-coalesce-stubs: load of libstub.dylib unexpectedly succeeded");
18 // try to load real dylib
19 dlopen("libbar.dylib", RTLD_LAZY
);
20 PASS("weak-coalesce-stubs");