]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/rpath-weak-missing.dtest/main.c
2 // BOOT_ARGS: dyld_flags=2
4 // BUILD: $CC foo.c -dynamiclib -o $BUILD_DIR/libmissing.dylib -install_name @rpath/libmissing.dylib
5 // BUILD: $CC foo.c -dynamiclib -Wl,-weak_library,$BUILD_DIR/libmissing.dylib -o $BUILD_DIR/libfoo.dylib -install_name $RUN_DIR/libfoo.dylib -rpath $RUN_DIR
6 // BUILD: $CC main.c -o $BUILD_DIR/rpath-weak-missing.exe -DRUN_DIR="$RUN_DIR"
8 // BUILD: $SKIP_INSTALL $BUILD_DIR/libmissing.dylib
10 // RUN: ./rpath-weak-missing.exe
11 // RUN: DYLD_AMFI_FAKE=0 ./rpath-weak-missing.exe
13 // main prog dlopen()s libfoo.dylib which weak links to @rpath/libmissing.dylib
18 #include "test_support.h"
22 void* handle
= dlopen(RUN_DIR
"/libfoo.dylib", RTLD_LAZY
);
23 if ( handle
== NULL
) {
24 FAIL("rpath-weak-missing dlopen(\"%s/libfoo.dylib\") - %s", RUN_DIR
, dlerror());
27 PASS("rpath-weak-missing");