about summary refs log tree commit diff
path: root/llvm_mode/afl-llvm-pass.so.cc
diff options
context:
space:
mode:
authorJoey Jiao <joeyjiaojg@163.com>2019-07-25 09:12:48 +0800
committerJoey Jiao <joeyjiaojg@163.com>2019-08-19 19:43:58 +0800
commit742aed4f2e8d46cd9a92c4eafb89986049bedfe4 (patch)
tree67c370d871395b83cd3e8d5c765019d9419a9088 /llvm_mode/afl-llvm-pass.so.cc
parent53012ff41cf522f96c206a0ed068e1de7e8c062f (diff)
downloadafl++-742aed4f2e8d46cd9a92c4eafb89986049bedfe4.tar.gz
Add support for Android
Diffstat (limited to 'llvm_mode/afl-llvm-pass.so.cc')
-rw-r--r--llvm_mode/afl-llvm-pass.so.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm_mode/afl-llvm-pass.so.cc b/llvm_mode/afl-llvm-pass.so.cc
index cfeff968..bdad835f 100644
--- a/llvm_mode/afl-llvm-pass.so.cc
+++ b/llvm_mode/afl-llvm-pass.so.cc
@@ -129,9 +129,14 @@ bool AFLCoverage::runOnModule(Module &M) {
       new GlobalVariable(M, PointerType::get(Int8Ty, 0), false,
                          GlobalValue::ExternalLinkage, 0, "__afl_area_ptr");
 
+#ifdef __ANDROID__
+  GlobalVariable *AFLPrevLoc = new GlobalVariable(
+      M, Int32Ty, false, GlobalValue::ExternalLinkage, 0, "__afl_prev_loc");
+#else
   GlobalVariable *AFLPrevLoc = new GlobalVariable(
       M, Int32Ty, false, GlobalValue::ExternalLinkage, 0, "__afl_prev_loc",
       0, GlobalVariable::GeneralDynamicTLSModel, 0, false);
+#endif
 
   /* Instrument all the things! */