]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-framework-fallback.dtest/main.c
2 // BUILD: $CC main.c -o $BUILD_DIR/dlopen-framework-fallback.exe
4 // RUN: ./dlopen-framework-fallback.exe
9 #include "test_support.h"
11 int main(int argc
, const char* argv
[], const char* envp
[], const char* apple
[]) {
12 // Verify dyld will fallback and look for framework in /System/Library/Frameworks/
13 void* handle
= dlopen("/System/Library/BadPath/CoreFoundation.framework/CoreFoundation", RTLD_LAZY
);
14 if ( handle
== NULL
) {
15 FAIL("dlerror(): %s", dlerror());
18 // validate handle works to find symbols
19 void* sym
= dlsym(handle
, "CFRetain");
21 FAIL("dlerror(): %s", dlerror());