diff options
author | hexcoder- <heiko@hexco.de> | 2020-02-28 05:00:22 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-02-28 05:00:22 +0100 |
commit | 0e8388d3eaa0f202091083c0fb623d55ce775bd4 (patch) | |
tree | 3c42bfe7aa6c1fc5bae7fa5e40211aa23490b8fa | |
parent | caa8fea8e2cf977ef565ea2bd9de2e606af1da49 (diff) | |
download | afl++-0e8388d3eaa0f202091083c0fb623d55ce775bd4.tar.gz |
add env info to afl-clang-fast, small Android change
-rw-r--r-- | llvm_mode/afl-clang-fast.c | 44 | ||||
-rw-r--r-- | src/afl-gcc.c | 9 |
2 files changed, 38 insertions, 15 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c index fe958ac7..44b786f9 100644 --- a/llvm_mode/afl-clang-fast.c +++ b/llvm_mode/afl-clang-fast.c @@ -82,7 +82,7 @@ static void find_obj(u8* argv0) { *slash = '/'; #ifdef __ANDROID__ - tmp = alloc_printf("%s/afl-llvm-rt.so", afl_path); + tmp = alloc_printf("%s/afl-llvm-rt.so", dir); #else tmp = alloc_printf("%s/afl-llvm-rt.o", dir); #endif @@ -114,7 +114,7 @@ static void find_obj(u8* argv0) { } FATAL( - "Unable to find 'afl-llvm-rt.o' or 'afl-llvm-pass.so.cc'. Please set " + "Unable to find 'afl-llvm-rt.o' or 'afl-llvm-pass.so'. Please set " "AFL_PATH"); } @@ -491,12 +491,40 @@ int main(int argc, char** argv, char** envp) { "an LLVM pass and tends to offer improved performance with slow " "programs.\n\n" - "You can specify custom next-stage toolchain via AFL_CC and AFL_CXX. " - "Setting\n" - "AFL_HARDEN enables hardening optimizations in the compiled code.\n\n" - "afl-clang-fast was built for llvm %s with the llvm binary path of " - "\"%s\".\n\n", - BIN_PATH, BIN_PATH, LLVM_VERSION, LLVM_BINDIR); + "Environment variables used:\n" + "AFL_CC: path to the C compiler to use\n" + "AFL_CXX: path to the C++ compiler to use\n" + "AFL_PATH: path to instrumenting pass and runtime (afl-llvm-rt.*o)\n" + "AFL_DONT_OPTIMIZE: disable optimization instead of -O3\n" + "AFL_NO_BUILTIN: compile for use with libtokencap.so\n" + "AFL_INST_RATIO: percentage of branches to instrument\n" + "AFL_QUIET: suppress verbose output\n" + "AFL_DEBUG: enable developer debugging output\n" + "AFL_HARDEN: adds code hardening to catch memory bugs\n" + "AFL_USE_ASAN: activate address sanitizer\n" + "AFL_USE_MSAN: activate memory sanitizer\n" + "AFL_USE_UBSAN: activate undefined behaviour sanitizer\n" + "AFL_LLVM_WHITELIST: enable whitelisting (selective instrumentation)\n" + "AFL_LLVM_NOT_ZERO: use cycling trace counters that skip zero\n" + + "AFL_USE_TRACE_PC, USE_TRACE_PC, AFL_LLVM_USE_TRACE_PC, AFL_TRACE_PC: \n" + " use LLVM trace-pc-guard instrumentation\n" + + "AFL_LLVM_LAF_SPLIT_COMPARES, LAF_SPLIT_COMPARES: enable cascaded comparisons\n" + "AFL_LLVM_LAF_SPLIT_SWITCHES, LAF_SPLIT_SWITCHES: casc. comp. in 'switch'\n" + "AFL_LLVM_LAF_TRANSFORM_COMPARES, LAF_TRANSFORM_COMPARES:\n" + " transform library comparison function calls to cascaded comparisons\n" + "AFL_LLVM_LAF_SPLIT_FLOATS: transform floating point comp. to cascaded comp.\n" + "AFL_LLVM_LAF_SPLIT_COMPARES_BITW, LAF_SPLIT_COMPARES_BITW: size limit (default 8)\n" + + "AFL_LLVM_INSTRIM, INSTRIM_LIB: use light weight instrumentation InsTrim\n" + "AFL_LLVM_INSTRIM_LOOPHEAD, LOOPHEAD: optimize loop tracing for speed\n" + + "AFL_CMPLOG, AFL_LLVM_CMPLOG: log operands of comparisons (RedQueen mutator)\n" + + "\nafl-clang-fast was built for llvm %s with the llvm binary path of " + "\"%s\".\n\n" + , BIN_PATH, BIN_PATH, LLVM_VERSION, LLVM_BINDIR); exit(1); diff --git a/src/afl-gcc.c b/src/afl-gcc.c index 5baec062..033c1eea 100644 --- a/src/afl-gcc.c +++ b/src/afl-gcc.c @@ -371,7 +371,7 @@ int main(int argc, char** argv) { printf("afl-cc" VERSION " by Michal Zalewski\n\n"); printf("%s \n\n", argv[0]); - printf("afl-gcc has no command line options\n\n%s", env_info); + printf("afl-gcc has no command line options\n\n%s\n", env_info); printf( "NOTE: afl-gcc is deprecated, llvm_mode is much faster and has more " "options\n"); @@ -402,12 +402,7 @@ int main(int argc, char** argv) { "following:\n\n" " CC=%s/afl-gcc ./configure\n" - " CXX=%s/afl-g++ ./configure\n\n" - - "You can specify custom next-stage toolchain via AFL_CC, AFL_CXX, and " - "AFL_AS.\n" - "Setting AFL_HARDEN enables hardening optimizations in the compiled " - "code.\n\n%s" + " CXX=%s/afl-g++ ./configure\n\n%s" , BIN_PATH, BIN_PATH, env_info); |