diff options
author | hexcoder- <heiko@hexco.de> | 2021-03-26 16:56:57 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2021-03-26 16:56:57 +0100 |
commit | 3439d641c0e79d2bb3229a04c7e78c45e0b1e3f5 (patch) | |
tree | 1953ec6b25495db370cfbc2cfeff47d4e8a1d791 | |
parent | 1006abffade85df1108112b728e09a666d8388a8 (diff) | |
download | afl++-3439d641c0e79d2bb3229a04c7e78c45e0b1e3f5.tar.gz |
pass lib -ldl only on Linux platforms
-rwxr-xr-x | test/test-llvm.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test-llvm.sh b/test/test-llvm.sh index eae76643..06d0a0f8 100755 --- a/test/test-llvm.sh +++ b/test/test-llvm.sh @@ -46,7 +46,8 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && { ../afl-clang-fast -DTEST_SHARED_OBJECT=1 -z defs -fPIC -shared -o test-instr.so ../test-instr.c > /dev/null 2>&1 test -e test-instr.so && { $ECHO "$GREEN[+] llvm_mode shared object with -z defs compilation succeeded" - ../afl-clang-fast -o test-dlopen.plain test-dlopen.c -ldl > /dev/null 2>&1 + test `uname -s` = 'Linux' && LIBS=-ldl : + ../afl-clang-fast -o test-dlopen.plain test-dlopen.c ${LIBS} > /dev/null 2>&1 test -e test-dlopen.plain && { $ECHO "$GREEN[+] llvm_mode test-dlopen compilation succeeded" echo 0 | TEST_DLOPEN_TARGET=./test-instr.so AFL_QUIET=1 ./test-dlopen.plain > /dev/null 2>&1 @@ -81,6 +82,7 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && { CODE=1 } rm -f test-dlopen.plain test-dlopen.plain.0 test-dlopen.plain.1 test-instr.so + unset LIBS } || { $ECHO "$RED[!] llvm_mode shared object with -z defs compilation failed" CODE=1 |