aboutsummaryrefslogtreecommitdiff
path: root/llvm_mode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/afl-clang-fast.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index fe91a01b..a1da83b2 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -49,7 +49,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)) {
@@ -73,7 +77,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)) {
@@ -88,8 +96,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;
@@ -358,7 +372,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:
@@ -383,7 +397,7 @@ static void edit_params(u32 argc, char** argv) {
}
- //#endif
+#endif
}