]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-empty-data.dtest/main.c
2 // BUILD: $CC foo.c -dynamiclib -install_name $RUN_DIR/libfoo-static.dylib -o $BUILD_DIR/libfoo-static.dylib
3 // BUILD: $CC foo.c -dynamiclib -install_name $RUN_DIR/libfoo-dynamic.dylib -o $BUILD_DIR/libfoo-dynamic.dylib
4 // BUILD: $CC main.c $BUILD_DIR/libfoo-static.dylib -o $BUILD_DIR/dlopen-empty-data.exe -DRUN_DIR="$RUN_DIR"
7 // RUN: ./dlopen-empty-data.exe
12 // libfoo-static.dylib and libfoo-dynamic.dylib each have an empty (no disk size) DATA segment
16 printf("[BEGIN] dlopen-empty-data\n");
18 void* handle
= dlopen(RUN_DIR
"/libfoo-dynamic.dylib", RTLD_LAZY
);
19 if ( handle
== NULL
) {
20 printf("[FAIL] dlopen-empty-data: libfoo-dynamic.dylib could not be loaded: %s\n", dlerror());
24 printf("[PASS] dlopen-empty-data\n");