]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/_dyld_register_for_image_loads.dtest/bar.c
dyld-733.6.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 __attribute__((constructor))
7 void bar() {
8 void* handle = dlopen(RUN_DIR "/libbaz.dylib", RTLD_FIRST);
9 if ( handle == NULL ) {
10 printf("[FAIL] dlopen(\"%s\") failed with: %s\n", RUN_DIR "/libbaz.dylib", dlerror());
11 exit(0);
12 }
13 }