diff --git a/lib/Target/X86/x86_64Relocator.cpp b/lib/Target/X86/x86_64Relocator.cpp index 3a8abe26b..877fcfe88 100644 --- a/lib/Target/X86/x86_64Relocator.cpp +++ b/lib/Target/X86/x86_64Relocator.cpp @@ -375,6 +375,7 @@ void x86_64Relocator::scanGlobalReloc(InputFile &pInputFile, Relocation &pReloc, return; } case llvm::ELF::R_X86_64_PLT32: { + std::lock_guard relocGuard(m_RelocMutex); // return if we already create plt for this symbol if (rsym->reserved() & ReservePLT) return;