From 358cb0ff7de7d3bebca063175da166ced18312cc Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 4 Jul 2014 19:31:27 +0000 Subject: [PATCH] Ignore llvm specific symbols in the LTOModule. These are the llvm.* globals and functions. I don't think it is possible to test this directly since llvm-lto is not a full linker and will not report duplicated symbols, but this fixes bootstrap with gold and lto enabled. llvm-svn: 212354 --- lib/LTO/LTOModule.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp index 314831ff6f8..2fa450fd9d9 100644 --- a/lib/LTO/LTOModule.cpp +++ b/lib/LTO/LTOModule.cpp @@ -531,6 +531,9 @@ bool LTOModule::parseSymbols(std::string &errMsg) { for (auto &Sym : IRFile->symbols()) { const GlobalValue *GV = IRFile->getSymbolGV(Sym.getRawDataRefImpl()); uint32_t Flags = Sym.getFlags(); + if (Flags & object::BasicSymbolRef::SF_FormatSpecific) + continue; + bool IsUndefined = Flags & object::BasicSymbolRef::SF_Undefined; if (!GV) {