]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-prebuilt-dlopen-closure.dtest/main.c
dyld-851.27.tar.gz
[apple/dyld.git] / testing / test-cases / dlopen-prebuilt-dlopen-closure.dtest / main.c
1
2 // BUILD: $CC main.c -o $BUILD_DIR/dlopen-prebuilt-dlopen-closure.exe
3
4 // RUN: ./dlopen-prebuilt-dlopen-closure.exe
5
6 // /usr/lib/libobjc-trampolines.dylib is not in the shared cache, but gets a prebuilt
7 // closure. On embedded platforms, this is validated using the cd-hash of the file vs
8 // what is in the pre-built closure.
9
10 #include <stdio.h>
11 #include <dlfcn.h>
12
13 #include "test_support.h"
14
15 int main(int argc, const char* argv[], const char* envp[], const char* apple[]) {
16 void* handle = dlopen("/usr/lib/libobjc-trampolines.dylib", RTLD_LAZY);
17 if ( handle == NULL ) {
18 FAIL("dlerror(): %s", dlerror());
19 }
20
21 PASS("Success");
22 }
23