about summary refs log tree commit diff
path: root/llvm_mode/afl-llvm-pass.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-08-23 12:42:11 +0200
committerGitHub <noreply@github.com>2019-08-23 12:42:11 +0200
commitb79adc01fa782c962aa1915e0484f63f0ebb7043 (patch)
tree48a79f2b96f3758a50d5b3e78b8014bf27cc802b /llvm_mode/afl-llvm-pass.so.cc
parent790d717543ae415ee30224644dd45fa408bba0c5 (diff)
parenta51d4227b6c1a6fec2a471aa9497b6d8201411ae (diff)
downloadafl++-b79adc01fa782c962aa1915e0484f63f0ebb7043.tar.gz
Merge pull request #28 from JoeyJiao/mine_android
Port 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! */