]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/allow_heap_execute/Makefile
ld64-123.2.tar.gz
[apple/ld64.git] / unit-tests / test-cases / allow_heap_execute / Makefile
1
2 TESTROOT = ../..
3 include ${TESTROOT}/include/common.makefile
4
5 #
6 # Test the we set the data execute bit for i386
7 #
8
9 run: run-${ARCH}
10
11 run-x86_64:
12 ${PASS_IFF} true
13
14 run-armv6:
15 ${PASS_IFF} true
16
17 run-armv7:
18 ${PASS_IFF} true
19
20 run-ppc:
21 ${PASS_IFF} true
22
23
24 run-i386:
25 # Test with the flag
26 ${CC} ${CCFLAGS} main.c -o main-allow -Wl,-allow_heap_execute
27 ${FAIL_IF_BAD_MACHO} main-allow
28 ${OTOOL} -hv main-allow | grep MH_NO_HEAP_EXECUTION | ${FAIL_IF_STDIN}
29 # Test without the flag
30 ${CC} ${CCFLAGS} main.c -o main
31 ${OTOOL} -hv main | grep MH_NO_HEAP_EXECUTION | ${FAIL_IF_EMPTY}
32 ${PASS_IFF_GOOD_MACHO} main
33
34 clean:
35 rm -rf main main-allow