Lines Matching refs:Sec
93 InputSectionBase &Sec, uint64_t Offset) { in getSrcMsgAux() argument
96 if (Optional<DILineInfo> Info = File.getDILineInfo(&Sec, Offset)) 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()
300 const Elf_Shdr &Sec) { in getShtGroupSignature() argument
305 Sections, CHECK(object::getSection<ELFT>(Sections, Sec.sh_link), this)); in getShtGroupSignature()
308 CHECK(object::getSymbol<ELFT>(this->ELFSyms, Sec.sh_info), this); in getShtGroupSignature()
319 return getSectionName(Sec); in getShtGroupSignature()
323 template <class ELFT> bool ObjFile<ELFT>::shouldMerge(const Elf_Shdr &Sec) { in shouldMerge() argument
343 if (Sec.sh_size == 0) in shouldMerge()
351 uint64_t EntSize = Sec.sh_entsize; in shouldMerge()
354 if (Sec.sh_size % EntSize) in shouldMerge()
358 uint64_t Flags = Sec.sh_flags; in shouldMerge()
380 for (const Elf_Shdr &Sec : ObjSections) { in initializeJustSymbols() local
381 if (Sec.sh_type != SHT_SYMTAB) in initializeJustSymbols()
383 this->initSymtab(ObjSections, &Sec); in initializeJustSymbols()
402 const Elf_Shdr &Sec = ObjSections[I]; in initializeSections() local
404 if (Sec.sh_type == ELF::SHT_LLVM_CALL_GRAPH_PROFILE) in initializeSections()
407 &Sec)); in initializeSections()
412 if ((Sec.sh_flags & SHF_EXCLUDE) && !Config->Relocatable) { in initializeSections()
413 if (Sec.sh_type == SHT_LLVM_ADDRSIG) { in initializeSections()
418 if (Sec.sh_link != 0) in initializeSections()
419 this->AddrsigSec = &Sec; in initializeSections()
428 switch (Sec.sh_type) { in initializeSections()
431 StringRef Signature = getShtGroupSignature(ObjSections, Sec); in initializeSections()
436 CHECK(Obj.template getSectionContentsAsArray<Elf_Word>(&Sec), this); in initializeSections()
453 this->Sections[I] = createInputSection(Sec); in initializeSections()
468 this->initSymtab(ObjSections, &Sec); in initializeSections()
471 this->SymtabSHNDX = CHECK(Obj.getSHNDXTable(Sec, ObjSections), this); in initializeSections()
477 this->Sections[I] = createInputSection(Sec); in initializeSections()
482 if (Sec.sh_flags & SHF_LINK_ORDER) { in initializeSections()
484 if (Sec.sh_link < this->Sections.size()) in initializeSections()
485 LinkSec = this->Sections[Sec.sh_link]; in initializeSections()
488 ": invalid sh_link index: " + Twine(Sec.sh_link)); in initializeSections()
584 InputSectionBase *ObjFile<ELFT>::getRelocTarget(const Elf_Shdr &Sec) { in getRelocTarget() argument
585 uint32_t Idx = Sec.sh_info; in getRelocTarget()
603 static InputSection *toRegularSection(MergeInputSection *Sec) { in toRegularSection() argument
604 return make<InputSection>(Sec->File, Sec->Flags, Sec->Type, Sec->Alignment, in toRegularSection()
605 Sec->data(), Sec->Name); in toRegularSection()
609 InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &Sec) { in createInputSection() argument
610 StringRef Name = getSectionName(Sec); in createInputSection()
612 switch (Sec.sh_type) { in createInputSection()
617 ArrayRef<uint8_t> Contents = check(this->getObj().getSectionContents(&Sec)); in createInputSection()
626 In.ARMAttributes = make<InputSection>(*this, Sec, Name); in createInputSection()
638 InputSectionBase *Target = getRelocTarget(Sec); in createInputSection()
646 InputSection *RelocSec = make<InputSection>(*this, Sec, Name); in createInputSection()
667 this->Sections[Sec.sh_info] = Target; in createInputSection()
670 if (Sec.sh_type == SHT_RELA) { in createInputSection()
671 ArrayRef<Elf_Rela> Rels = CHECK(this->getObj().relas(&Sec), this); in createInputSection()
676 ArrayRef<Elf_Rel> Rels = CHECK(this->getObj().rels(&Sec), this); in createInputSection()
688 InputSection *RelocSec = make<InputSection>(*this, Sec, Name); in createInputSection()
755 return make<EhInputSection>(*this, Sec, Name); in createInputSection()
757 if (shouldMerge(Sec)) in createInputSection()
758 return make<MergeInputSection>(*this, Sec, Name); in createInputSection()
759 return make<InputSection>(*this, Sec, Name); in createInputSection()
763 StringRef ObjFile<ELFT>::getSectionName(const Elf_Shdr &Sec) { in getSectionName() argument
764 return CHECK(this->getObj().getSectionName(&Sec, SectionStringTable), this); in getSectionName()
780 InputSectionBase *Sec = this->Sections[SecIdx]; in createSymbol() local
797 return make<Defined>(this, Name, Binding, StOther, Type, Value, Size, Sec); in createSymbol()
819 if (Sec == &InputSection::Discarded) in createSymbol()
822 return Symtab->addDefined(Name, StOther, Type, Value, Size, Binding, Sec, in createSymbol()
874 for (const Elf_Shdr &Sec : Sections) { in parseDynamic() local
875 switch (Sec.sh_type) { in parseDynamic()
879 this->initSymtab(Sections, &Sec); in parseDynamic()
882 DynamicSec = &Sec; in parseDynamic()
885 this->SymtabSHNDX = CHECK(Obj.getSHNDXTable(Sec, Sections), this); in parseDynamic()
888 this->VersymSec = &Sec; in parseDynamic()
891 this->VerdefSec = &Sec; in parseDynamic()
1295 for (const typename ELFT::Shdr &Sec : Sections) { in parse() local
1296 if (Sec.sh_type != SHT_SYMTAB) in parse()
1299 typename ELFT::SymRange Syms = CHECK(Obj.symbols(&Sec), this); in parse()
1300 uint32_t FirstGlobal = Sec.sh_info; in parse()
1302 CHECK(Obj.getStringTableForSymtab(Sec, Sections), this); in parse()