X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/77cc3118ce7a3a70a0a7364d77ae1eb766a477e7..a645023da60d22e86be13f7b4d97adeff8bc6665:/unit-tests/test-cases/undefined-dynamic-lookup/Makefile diff --git a/unit-tests/test-cases/undefined-dynamic-lookup/Makefile b/unit-tests/test-cases/undefined-dynamic-lookup/Makefile index eebcc37..69b40c7 100644 --- a/unit-tests/test-cases/undefined-dynamic-lookup/Makefile +++ b/unit-tests/test-cases/undefined-dynamic-lookup/Makefile @@ -1,5 +1,5 @@ ## -# Copyright (c) 2007 Apple Inc. All rights reserved. +# Copyright (c) 2007-2010 Apple Inc. All rights reserved. # # @APPLE_LICENSE_HEADER_START@ # @@ -30,18 +30,31 @@ include ${TESTROOT}/include/common.makefile run: all all: - ${CC} ${CCFLAGS} main.c -o main -undefined dynamic_lookup + ${CC} ${CCFLAGS} main.c -o main -undefined dynamic_lookup nm -m main | grep _foo | grep "dynamically looked up" | ${FAIL_IF_EMPTY} + ${DYLDINFO} -lazy_bind -bind main | grep _foo | grep "flat-namespace" | ${FAIL_IF_EMPTY} + ${DYLDINFO} -lazy_bind -bind main | grep _exit | grep "flat-namespace" | ${FAIL_IF_STDIN} ${FAIL_IF_BAD_MACHO} main ${CC} ${CCFLAGS} main.c -o main -Wl,-U,_foo nm -m main | grep _foo | grep "dynamically looked up" | ${FAIL_IF_EMPTY} + ${DYLDINFO} -lazy_bind -bind main | grep _foo | grep "flat-namespace" | ${FAIL_IF_EMPTY} + ${DYLDINFO} -lazy_bind -bind main | grep _exit | grep "flat-namespace" | ${FAIL_IF_STDIN} ${FAIL_IF_BAD_MACHO} main ${CC} ${CCFLAGS} main.c -o main -flat_namespace -Wl,-U,_foo nm -m main | grep _foo | grep "dynamically looked up" | ${FAIL_IF_STDIN} - ${PASS_IFF_GOOD_MACHO} main + ${DYLDINFO} -lazy_bind -bind main | grep _foo | grep "flat-namespace" | ${FAIL_IF_EMPTY} + ${DYLDINFO} -lazy_bind -bind main | grep _exit | grep "flat-namespace" | ${FAIL_IF_EMPTY} + ${FAIL_IF_BAD_MACHO} main + + ${CC} ${CCFLAGS} main.c -bundle -o main.bundle -nodefaultlibs -undefined dynamic_lookup + nm -m main.bundle | grep _foo | grep "dynamically looked up" | ${FAIL_IF_EMPTY} + ${DYLDINFO} -lazy_bind -bind main.bundle | grep _foo | grep "flat-namespace" | ${FAIL_IF_EMPTY} + ${DYLDINFO} -lazy_bind -bind main.bundle | grep _exit | grep "flat-namespace" | ${FAIL_IF_STDIN} + ${PASS_IFF_GOOD_MACHO} main.bundle + clean: - rm main + rm -f main main.bundle