dyld-750.5.tar.gz
[apple/dyld.git] / testing / test-cases / _dyld_register_for_image_loads.dtest / bar.c
1
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <dlfcn.h>
5
6 #include "test_support.h"
7
8 __attribute__((constructor))
9 void bar(int argc, const char* argv[], const char* envp[], const char* apple[]) {
10 void* handle = dlopen(RUN_DIR "/libbaz.dylib", RTLD_FIRST);
11 if ( handle == NULL ) {
12 FAIL("dlopen(\"%s\") failed with: %s", RUN_DIR "/libbaz.dylib", dlerror());
13 exit(0);
14 }
15 }