]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-dyld.dtest/main.c
dyld-851.27.tar.gz
[apple/dyld.git] / testing / test-cases / dlopen-dyld.dtest / main.c
1
2 // BUILD: $CC main.c -o $BUILD_DIR/dlopen-dyld.exe
3
4 // RUN: ./dlopen-dyld.exe
5
6
7 #include <stdbool.h>
8 #include <stdio.h>
9 #include <dlfcn.h>
10
11 #include "test_support.h"
12
13
14 int main(int argc, const char* argv[], const char* envp[], const char* apple[])
15 {
16 void* handle = dlopen("/usr/lib/dyld", RTLD_LAZY);
17 if ( handle == NULL )
18 PASS("Success");
19 else
20 FAIL("dlopen-dyld: dlopen() should have failed");
21 }