diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-01-06 11:46:23 +0100 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-01-06 11:46:23 +0100 |
commit | b95cd8968d765bf71fffb13e3cdc8d13e24949d1 (patch) | |
tree | cfcd46a3395dd091b8aa48ec665e0df57ccf8b62 /llvm_mode/afl-clang-fast.c | |
parent | 67cbeeb395c7e0aa8820e79c92f5e8e1322f8be0 (diff) | |
parent | e7fc1ef49e8c9d8fa563f321f5e5906ce8fad69d (diff) | |
download | afl++-b95cd8968d765bf71fffb13e3cdc8d13e24949d1.tar.gz |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r-- | llvm_mode/afl-clang-fast.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c index ef98bf25..724ae1a9 100644 --- a/llvm_mode/afl-clang-fast.c +++ b/llvm_mode/afl-clang-fast.c @@ -50,7 +50,11 @@ static void find_obj(u8* argv0) { if (afl_path) { +#ifdef __ANDROID__ + tmp = alloc_printf("%s/afl-llvm-rt.so", afl_path); +#else tmp = alloc_printf("%s/afl-llvm-rt.o", afl_path); +#endif if (!access(tmp, R_OK)) { @@ -74,7 +78,11 @@ static void find_obj(u8* argv0) { dir = ck_strdup(argv0); *slash = '/'; +#ifdef __ANDROID__ + tmp = alloc_printf("%s/afl-llvm-rt.so", afl_path); +#else tmp = alloc_printf("%s/afl-llvm-rt.o", dir); +#endif if (!access(tmp, R_OK)) { @@ -89,8 +97,14 @@ static void find_obj(u8* argv0) { } +#ifdef __ANDROID__ + if (!access(AFL_PATH "/afl-llvm-rt.so", R_OK)) { + +#else if (!access(AFL_PATH "/afl-llvm-rt.o", R_OK)) { +#endif + obj_path = AFL_PATH; return; @@ -359,7 +373,7 @@ static void edit_params(u32 argc, char** argv) { } - //#ifndef __ANDROID__ // not sure, we might need these ifdefs for Android +#ifndef __ANDROID__ switch (bit_mode) { case 0: @@ -384,7 +398,7 @@ static void edit_params(u32 argc, char** argv) { } - //#endif +#endif } |