4 include ${TESTROOT}/include/common.makefile
7 # Check -function_starts
14 ${CC} ${CCFLAGS} main.c -o main -Wl,-function_starts
15 ${DYLDINFO} -function_starts main | grep _bar | ${FAIL_IF_EMPTY}
17 ${CC} ${CCFLAGS} main.c -dynamiclib -o libmain.dylib -Wl,-function_starts
18 ${DYLDINFO} -function_starts libmain.dylib | grep _bar | ${FAIL_IF_EMPTY}
19 # as dylib with prefered load address
20 ${CC} ${CCFLAGS} main.c -dynamiclib -o libmain2.dylib -seg1addr 0x200000 -Wl,-function_starts
21 ${DYLDINFO} -function_starts libmain2.dylib | grep _bar | ${FAIL_IF_EMPTY}
22 # as dylib with aliases
23 ${CC} ${CCFLAGS} main.c -dynamiclib -o libmain3.dylib -Wl,-function_starts -Wl,-alias,_mid,midalias
24 ${DYLDINFO} -function_starts libmain3.dylib | grep _bar | ${FAIL_IF_EMPTY}
25 ${PASS_IFF_GOOD_MACHO} main
29 rm main libmain.dylib libmain2.dylib libmain3.dylib