Lines Matching refs:sym
78 l->file->addMember(l->sym); in forceLazy()
86 l->file->makeImport(l->sym); in forceLazy()
155 Symbol *sym; in getSymbolLocations() member
174 Symbol *sym = getSymbol(sc, r.VirtualAddress); in getSymbolLocations() local
176 locations.push_back({sym, *fileLine}); in getSymbolLocations()
177 else if (sym) in getSymbolLocations()
178 locations.push_back({sym, {"", 0}}); in getSymbolLocations()
198 if (loc.sym) in getSymbolLocations()
199 os << ":(" << toString(*loc.sym) << ')'; in getSymbolLocations()
226 Symbol *sym; member
237 os << "undefined symbol: " << toString(*undefDiag.sym); in reportUndefinedSymbol()
260 Symbol *sym = i.second; in loadMinGWSymbols() local
261 auto *undef = dyn_cast<Undefined>(sym); in loadMinGWSymbols()
322 bool SymbolTable::handleMinGWAutomaticImport(Symbol *sym, StringRef name) { in handleMinGWAutomaticImport() argument
348 sym->replaceKeepingName(imp, impSize); in handleMinGWAutomaticImport()
349 sym->isRuntimePseudoReloc = true; in handleMinGWAutomaticImport()
360 if (sc && sc->getRelocs().size() == 1 && *sc->symbols().begin() == sym) { in handleMinGWAutomaticImport()
400 for (Symbol *sym : symbols) { in reportProblemSymbols()
402 if (!sym) in reportProblemSymbols()
404 if (undefs.count(sym)) { in reportProblemSymbols()
405 auto it = firstDiag.find(sym); in reportProblemSymbols()
407 firstDiag[sym] = undefDiags.size(); in reportProblemSymbols()
408 undefDiags.push_back({sym, {{file, symIndex}}}); in reportProblemSymbols()
414 if (Symbol *imp = localImports->lookup(sym)) in reportProblemSymbols()
435 Symbol *sym = i.second; in reportUnresolvable() local
436 auto *undef = dyn_cast<Undefined>(sym); in reportUnresolvable()
437 if (!undef || sym->deferUndefined) in reportUnresolvable()
451 undefs.insert(sym); in reportUnresolvable()
464 Symbol *sym = i.second; in resolveRemainingUndefines() local
465 auto *undef = dyn_cast<Undefined>(sym); in resolveRemainingUndefines()
468 if (!sym->isUsedInRegularObj) in resolveRemainingUndefines()
481 memcpy(sym, d, sizeof(DefinedRegular)); in resolveRemainingUndefines()
483 memcpy(sym, d, sizeof(DefinedAbsolute)); in resolveRemainingUndefines()
485 memcpy(sym, d, sizeof(SymbolUnion)); in resolveRemainingUndefines()
495 replaceSymbol<DefinedLocalImport>(sym, name, d); in resolveRemainingUndefines()
496 localImportChunks.push_back(cast<DefinedLocalImport>(sym)->getChunk()); in resolveRemainingUndefines()
497 localImports[sym] = d; in resolveRemainingUndefines()
507 if (config->autoImport && handleMinGWAutomaticImport(sym, name)) in resolveRemainingUndefines()
513 replaceSymbol<DefinedAbsolute>(sym, name, 0); in resolveRemainingUndefines()
514 undefs.insert(sym); in resolveRemainingUndefines()
524 Symbol *&sym = symMap[CachedHashStringRef(name)]; in insert() local
525 if (!sym) { in insert()
526 sym = reinterpret_cast<Symbol *>(make<SymbolUnion>()); in insert()
527 sym->isUsedInRegularObj = false; in insert()
528 sym->pendingArchiveLoad = false; in insert()
529 sym->canInline = true; in insert()
532 return {sym, inserted}; in insert()
556 void SymbolTable::addLazyArchive(ArchiveFile *f, const Archive::Symbol &sym) { in addLazyArchive() argument
557 StringRef name = sym.getName(); in addLazyArchive()
562 replaceSymbol<LazyArchive>(s, f, sym); in addLazyArchive()
569 f->addMember(sym); in addLazyArchive()
587 void SymbolTable::addLazyDLLSymbol(DLLFile *f, DLLFile::Symbol *sym, in addLazyDLLSymbol() argument
593 replaceSymbol<LazyDLLSymbol>(s, f, sym, n); in addLazyDLLSymbol()
600 f->makeImport(sym); in addLazyDLLSymbol()
670 Symbol *SymbolTable::addAbsolute(StringRef n, COFFSymbolRef sym) { in addAbsolute() argument
676 replaceSymbol<DefinedAbsolute>(s, n, sym); in addAbsolute()
678 if (da->getVA() != sym.getValue()) in addAbsolute()
713 const coff_symbol_generic *sym, SectionChunk *c, in addRegular() argument
720 /*IsExternal*/ true, sym, c); in addRegular()
728 const coff_symbol_generic *sym) { in addComdat() argument
734 /*IsExternal*/ true, sym, nullptr); in addComdat()
744 const coff_symbol_generic *sym, CommonChunk *c) { in addCommon() argument
749 replaceSymbol<DefinedCommon>(s, f, n, size, sym, c); in addCommon()
752 replaceSymbol<DefinedCommon>(s, f, n, size, sym, c); in addCommon()
786 Symbol *sym = findUnderscore(name); in addLibcall() local
787 if (!sym) in addLibcall()
790 if (auto *l = dyn_cast<LazyArchive>(sym)) { in addLibcall()
793 addUndefined(sym->getName()); in addLibcall()
794 } else if (LazyObject *o = dyn_cast<LazyObject>(sym)) { in addLibcall()
796 addUndefined(sym->getName()); in addLibcall()
835 if (Symbol *sym = find(name)) in findMangle() local
836 if (!isa<Undefined>(sym)) in findMangle()
837 return sym; in findMangle()