]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dladdr-basic.dtest/main-no-syms.c
2 // BUILD: $CC main-no-syms.c -o $BUILD_DIR/dladdr-stripped.exe
3 // BUILD: strip $BUILD_DIR/dladdr-stripped.exe
5 // RUN: ./dladdr-stripped.exe
12 #include <mach-o/dyld_priv.h>
17 /// verify dladdr() returns NULL for a symbol name in a fully stripped
18 /// main executable (and not _mh_execute_header+nnn).
23 printf("[BEGIN] dladdr-stripped\n");
26 if ( dladdr(&main
, &info
) == 0 ) {
27 printf("[FAIL] dladdr(&main, xx) failed\n");
31 if ( info
.dli_sname
!= NULL
){
32 printf("[FAIL] dladdr() returned: \"%s\" instead of NULL\n", info
.dli_sname
);
36 printf("[PASS] dladdr-stripped\n");