]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/rpath-absolute.dtest/main.c
f37c78e7ca01af57114b4d413b4930c707ebf3e5
[apple/dyld.git] / testing / test-cases / rpath-absolute.dtest / main.c
1
2 // BOOT_ARGS: dyld_flags=2
3
4 // BUILD: $CC foo.c -dynamiclib -o $BUILD_DIR/librpathabs.dylib -install_name @rpath/librpathabs.dylib
5 // BUILD: $CC foo.c -dynamiclib $BUILD_DIR/librpathabs.dylib -o $BUILD_DIR/libfoo.dylib -install_name $RUN_DIR/libfoo.dylib -rpath $RUN_DIR
6 // BUILD: $CC main.c $BUILD_DIR/libfoo.dylib -o $BUILD_DIR/rpath-absolute.exe
7
8 // RUN: DYLD_AMFI_FAKE=0 ./rpath-absolute.exe
9
10 // main prog links with libfoo.dylib which uses an absolute LC_RPRATH and @rpath to find librpathabs.dylib
11 // must be able to run with full restrictions
12
13 #include <stdio.h>
14
15 extern int foo;
16
17
18 int main()
19 {
20 printf("[BEGIN] rpath-absolute.exe\n");
21 printf("[PASS] rpath-absolute.exe\n");
22 return 0;
23 }
24
25