fix LTO mode

This commit is contained in:
van Hauser
2020-05-05 20:10:54 +02:00
parent a38980c80b
commit 00683d06c2
3 changed files with 9 additions and 13 deletions

View File

@ -583,8 +583,7 @@ bool AFLCoverage::runOnModule(Module &M) {
GlobalVariable *AFLFinalLoc = new GlobalVariable(
M, Int32Ty, true, GlobalValue::ExternalLinkage, 0,
"__afl_final_loc", 0, GlobalVariable::GeneralDynamicTLSModel, 0,
false);
"__afl_final_loc");
ConstantInt *const_loc = ConstantInt::get(Int32Ty, map_size);
StoreInst * StoreFinalLoc = IRB.CreateStore(const_loc, AFLFinalLoc);
StoreFinalLoc->setMetadata(M.getMDKindID("nosanitize"),