]> git.saurik.com Git - apple/ld64.git/blobdiff - unit-tests/test-cases/function-starts/Makefile
ld64-127.2.tar.gz
[apple/ld64.git] / unit-tests / test-cases / function-starts / Makefile
index 0b43cd5e8584eda66b8278be6539c0cc53a51c90..531bb7a3fa138451e520ec414b0b64daa9bc286c 100644 (file)
@@ -22,8 +22,15 @@ all:
        # as dylib with aliases
        ${CC} ${CCFLAGS} main.c -dynamiclib -o libmain3.dylib -Wl,-function_starts -Wl,-alias,_mid,midalias
        ${DYLDINFO} -function_starts libmain3.dylib | grep _bar | ${FAIL_IF_EMPTY}
        # as dylib with aliases
        ${CC} ${CCFLAGS} main.c -dynamiclib -o libmain3.dylib -Wl,-function_starts -Wl,-alias,_mid,midalias
        ${DYLDINFO} -function_starts libmain3.dylib | grep _bar | ${FAIL_IF_EMPTY}
+       # as static main executable
+       ${CC} ${CCFLAGS} main.c -static -e _main -o main_static -nostdlib -Wl,-new_linker -Wl,-alias,_myexit,_exit
+       ${DYLDINFO} -function_starts main_static | grep _bar | ${FAIL_IF_STDIN}
+       ${CC} ${CCFLAGS} main.c -static -e _main -o main_static -nostdlib -Wl,-new_linker -Wl,-alias,_myexit,_exit -Wl,-function_starts
+       ${DYLDINFO} -function_starts main_static | grep _bar | ${FAIL_IF_EMPTY}
+
+
        ${PASS_IFF_GOOD_MACHO} main
        
 
 clean:
        ${PASS_IFF_GOOD_MACHO} main
        
 
 clean:
-       rm  main libmain.dylib libmain2.dylib libmain3.dylib
+       rm  main libmain.dylib libmain2.dylib libmain3.dylib main_static