Lines Matching refs:sym
35 Symbol *sym; in insert() local
38 sym = symVector[p.first->second]; in insert()
41 sym = reinterpret_cast<Symbol *>(make<SymbolUnion>()); in insert()
42 symVector.push_back(sym); in insert()
45 sym->isUsedInRegularObj |= !file || isa<ObjFile>(file); in insert()
46 return {sym, p.second}; in insert()
54 const Symbol *sym; member
58 const Symbol *sym) in DuplicateSymbolDiag()
59 : src1(src1), src2(src2), sym(sym) {} in DuplicateSymbolDiag()
294 const object::Archive::Symbol &sym) { in addLazyArchive() argument
298 replaceSymbol<LazyArchive>(s, file, sym); in addLazyArchive()
300 file->fetch(sym); in addLazyArchive()
304 file->fetch(sym); in addLazyArchive()
306 replaceSymbol<LazyArchive>(s, file, sym); in addLazyArchive()
348 static Defined *createBoundarySymbol(const Undefined &sym) { in createBoundarySymbol() argument
350 sym.getName(), /*isec=*/nullptr, /*value=*/-1, /*isPrivateExtern=*/true, in createBoundarySymbol()
354 static void handleSectionBoundarySymbol(const Undefined &sym, StringRef segSect, in handleSectionBoundarySymbol() argument
379 assert(sym.isLive()); in handleSectionBoundarySymbol()
389 osec->sectionStartSymbols.push_back(createBoundarySymbol(sym)); in handleSectionBoundarySymbol()
391 osec->sectionEndSymbols.push_back(createBoundarySymbol(sym)); in handleSectionBoundarySymbol()
394 static void handleSegmentBoundarySymbol(const Undefined &sym, StringRef segName, in handleSegmentBoundarySymbol() argument
398 seg->segmentStartSymbols.push_back(createBoundarySymbol(sym)); in handleSegmentBoundarySymbol()
400 seg->segmentEndSymbols.push_back(createBoundarySymbol(sym)); in handleSegmentBoundarySymbol()
405 static bool recoverFromUndefinedSymbol(const Undefined &sym) { in recoverFromUndefinedSymbol() argument
407 StringRef name = sym.getName(); in recoverFromUndefinedSymbol()
409 handleSectionBoundarySymbol(sym, name, Boundary::Start); in recoverFromUndefinedSymbol()
413 handleSectionBoundarySymbol(sym, name, Boundary::End); in recoverFromUndefinedSymbol()
417 handleSegmentBoundarySymbol(sym, name, Boundary::Start); in recoverFromUndefinedSymbol()
421 handleSegmentBoundarySymbol(sym, name, Boundary::End); in recoverFromUndefinedSymbol()
430 if (config->explicitDynamicLookups.count(sym.getName())) { in recoverFromUndefinedSymbol()
431 symtab->addDynamicLookup(sym.getName()); in recoverFromUndefinedSymbol()
439 symtab->addDynamicLookup(sym.getName()); in recoverFromUndefinedSymbol()
445 symtab->addDynamicLookup(sym.getName()); in recoverFromUndefinedSymbol()
466 if (!config->deadStripDuplicates || duplicate.sym->isLive()) { in reportPendingDuplicateSymbols()
468 "duplicate symbol: " + toString(*duplicate.sym) + "\n>>> defined in "; in reportPendingDuplicateSymbols()
497 static const Symbol *getAlternativeSpelling(const Undefined &sym, in getAlternativeSpelling() argument
501 if (sym.getFile() && sym.getFile()->kind() == InputFile::ObjKind) { in getAlternativeSpelling()
503 for (const Symbol *s : sym.getFile()->symbols) in getAlternativeSpelling()
525 StringRef name = sym.getName(); in getAlternativeSpelling()
564 for (Symbol *sym : symtab->getSymbols()) in getAlternativeSpelling()
565 if (dyn_cast<Undefined>(sym) == nullptr && in getAlternativeSpelling()
566 name.equals_insensitive(sym->getName())) in getAlternativeSpelling()
567 return sym; in getAlternativeSpelling()
593 for (Symbol *sym : symtab->getSymbols()) in getAlternativeSpelling()
594 if (canSuggestExternCForCXX(nameWithoutUnderscore, sym->getName())) { in getAlternativeSpelling()
595 s = sym; in getAlternativeSpelling()
608 static void reportUndefinedSymbol(const Undefined &sym, in reportUndefinedSymbol() argument
614 message += ": " + toString(sym); in reportUndefinedSymbol()
646 getAlternativeSpelling(sym, preHint, postHint)) { in reportUndefinedSymbol()
673 void macho::treatUndefinedSymbol(const Undefined &sym, StringRef source) { in treatUndefinedSymbol() argument
674 if (recoverFromUndefinedSymbol(sym)) in treatUndefinedSymbol()
677 undefs[&sym].otherReferences.push_back(source.str()); in treatUndefinedSymbol()
680 void macho::treatUndefinedSymbol(const Undefined &sym, const InputSection *isec, in treatUndefinedSymbol() argument
682 if (recoverFromUndefinedSymbol(sym)) in treatUndefinedSymbol()
685 undefs[&sym].codeReferences.push_back({isec, offset}); in treatUndefinedSymbol()