Lines Matching refs:Sym
92 static std::string getSrcMsgAux(ObjFile<ELFT> &File, const Symbol &Sym, in getSrcMsgAux() argument
101 File.getVariableLoc(Sym.getName())) in getSrcMsgAux()
108 std::string InputFile::getSrcMsg(const Symbol &Sym, InputSectionBase &Sec, in getSrcMsg() argument
116 return getSrcMsgAux(cast<ObjFile<ELF32LE>>(*this), Sym, Sec, Offset); in getSrcMsg()
118 return getSrcMsgAux(cast<ObjFile<ELF32BE>>(*this), Sym, Sec, Offset); in getSrcMsg()
120 return getSrcMsgAux(cast<ObjFile<ELF64LE>>(*this), Sym, Sec, Offset); in getSrcMsg()
122 return getSrcMsgAux(cast<ObjFile<ELF64BE>>(*this), Sym, Sec, Offset); in getSrcMsg()
251 uint32_t ELFFileBase<ELFT>::getSectionIndex(const Elf_Sym &Sym) const { in getSectionIndex()
252 return CHECK(getObj().getSectionIndex(&Sym, ELFSyms, SymtabSHNDX), this); in getSectionIndex()
307 const Elf_Sym *Sym = in getShtGroupSignature() local
309 StringRef Signature = CHECK(Sym->getName(this->StringTable), this); in getShtGroupSignature()
318 if (Signature.empty() && Sym->getType() == STT_SECTION) in getShtGroupSignature()
769 for (const Elf_Sym &Sym : this->ELFSyms) in initializeSymbols()
770 this->Symbols.push_back(createSymbol(&Sym)); in initializeSymbols()
773 template <class ELFT> Symbol *ObjFile<ELFT>::createSymbol(const Elf_Sym *Sym) { in createSymbol() argument
774 int Binding = Sym->getBinding(); in createSymbol()
776 uint32_t SecIdx = this->getSectionIndex(*Sym); in createSymbol()
781 uint8_t StOther = Sym->st_other; in createSymbol()
782 uint8_t Type = Sym->getType(); in createSymbol()
783 uint64_t Value = Sym->st_value; in createSymbol()
784 uint64_t Size = Sym->st_size; in createSymbol()
787 if (Sym->getType() == STT_FILE) in createSymbol()
788 SourceFile = CHECK(Sym->getName(this->StringTable), this); in createSymbol()
790 if (this->StringTable.size() <= Sym->st_name) in createSymbol()
793 StringRefZ Name = this->StringTable.data() + Sym->st_name; in createSymbol()
794 if (Sym->st_shndx == SHN_UNDEF) in createSymbol()
800 StringRef Name = CHECK(Sym->getName(this->StringTable), this); in createSymbol()
802 switch (Sym->st_shndx) { in createSymbol()
832 for (const Archive::Symbol &Sym : File->symbols()) in parse() local
833 Symtab->addLazyArchive<ELFT>(Sym.getName(), *this, Sym); in parse()
837 InputFile *ArchiveFile::fetch(const Archive::Symbol &Sym) { in fetch() argument
839 CHECK(Sym.getMember(), toString(this) + in fetch()
841 Sym.getName()); in fetch()
850 Sym.getName()); in fetch()
973 const Elf_Sym &Sym) { in getAlignment() argument
975 if (Sym.st_value) in getAlignment()
976 Ret = 1ULL << countTrailingZeros((uint64_t)Sym.st_value); in getAlignment()
977 if (0 < Sym.st_shndx && Sym.st_shndx < Sections.size()) in getAlignment()
978 Ret = std::min<uint64_t>(Ret, Sections[Sym.st_shndx].sh_addralign); in getAlignment()
1010 const Elf_Sym &Sym = Syms[I]; in parseRest() local
1016 StringRef Name = CHECK(Sym.getName(this->StringTable), this); in parseRest()
1017 if (Sym.getBinding() == STB_LOCAL) { in parseRest()
1023 if (Sym.isUndefined()) { in parseRest()
1024 Symbol *S = Symtab->addUndefined<ELFT>(Name, Sym.getBinding(), in parseRest()
1025 Sym.st_other, Sym.getType(), in parseRest()
1039 uint64_t Alignment = getAlignment(Sections, Sym); in parseRest()
1041 Symtab->addShared(Name, *this, Sym, Alignment, Idx); in parseRest()
1059 Symtab->addShared(Saver.save(Name), *this, Sym, Alignment, Idx); in parseRest()
1281 for (const lto::InputFile::Symbol &Sym : Obj->symbols()) in parse() local
1282 if (!Sym.isUndefined()) in parse()
1283 Symtab->addLazyObject<ELFT>(Saver.save(Sym.getName()), *this); in parse()
1304 for (const typename ELFT::Sym &Sym : Syms.slice(FirstGlobal)) in parse() local
1305 if (Sym.st_shndx != SHN_UNDEF) in parse()
1306 Symtab->addLazyObject<ELFT>(CHECK(Sym.getName(StringTable), this), in parse()