]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/rpath-relative.dtest/main.c
dyld-851.27.tar.gz
[apple/dyld.git] / testing / test-cases / rpath-relative.dtest / main.c
1
2 // BOOT_ARGS: dyld_flags=2
3
4 // BUILD: $CC foo.c -dynamiclib -o $BUILD_DIR/librel.dylib -install_name @rpath/librel.dylib
5 // BUILD: $CC main.c $BUILD_DIR/librel.dylib -o $BUILD_DIR/rpath-executable.exe -rpath @executable_path
6 // BUILD: $CC main.c $BUILD_DIR/librel.dylib -o $BUILD_DIR/rpath-executable-slash.exe -rpath @executable_path/
7 // BUILD: $CC main.c $BUILD_DIR/librel.dylib -o $BUILD_DIR/rpath-loader.exe -rpath @loader_path
8 // BUILD: $CC main.c $BUILD_DIR/librel.dylib -o $BUILD_DIR/rpath-loader-slash.exe -rpath @loader_path/
9
10 // RUN: ./rpath-executable.exe
11 // RUN: ./rpath-executable-slash.exe
12 // RUN: ./rpath-loader.exe
13 // RUN: ./rpath-loader-slash.exe
14
15 // main prog links with librel.dylib. There are four variants of how LC_RPATH is set up.
16
17 #include <stdio.h>
18
19 #include "test_support.h"
20
21 extern char* __progname;
22
23
24 int main(int argc, const char* argv[])
25 {
26 PASS("%s", __progname);
27 }
28
29