]>
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>
14 #include "test_support.h"
17 /// verify dladdr() returns NULL for a symbol name in a fully stripped
18 /// main executable (and not _mh_execute_header+nnn).
21 int main(int argc
, const char* argv
[], const char* envp
[], const char* apple
[]) {
23 if ( dladdr(&main
, &info
) == 0 ) {
24 FAIL("dladdr(&main, xx) failed");
27 if ( info
.dli_sname
!= NULL
){
28 FAIL("%s\" instead of NULL", info
.dli_sname
);