]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-rpath-from-dylib.dtest/main.c
dyld-851.27.tar.gz
[apple/dyld.git] / testing / test-cases / dlopen-rpath-from-dylib.dtest / main.c
1
2 // BUILD: $CC bar.c -dynamiclib -install_name @rpath/libbar.dylib -o $BUILD_DIR/dir/libbar.dylib
3 // BUILD: $CC test.c -dynamiclib -install_name $RUN_DIR/libtest.dylib -o $BUILD_DIR/libtest.dylib -rpath @loader_path/dir
4 // BUILD: $CC main.c -o $BUILD_DIR/dlopen-rpath-from-dylib.exe $BUILD_DIR/libtest.dylib
5
6 // RUN: ./dlopen-rpath-from-dylib.exe
7
8 #include <stdio.h>
9 #include <dlfcn.h>
10 #include <stdbool.h>
11
12 #include "test_support.h"
13
14 /// test that a call to dlopen() from a dylib uses the LC_RPATH from that dylib
15
16 extern void test_dlopen();
17
18 int main(int argc, const char* argv[], const char* envp[], const char* apple[]) {
19 test_dlopen();
20 PASS("Succcess");
21 }
22