Lines Matching refs:sec
375 const InputSectionBase &sec, uint64_t offset) { in getSrcMsgAux() argument
378 if (std::optional<DILineInfo> info = file.getDILineInfo(&sec, offset)) in getSrcMsgAux()
390 std::string InputFile::getSrcMsg(const Symbol &sym, const InputSectionBase &sec, in getSrcMsg() argument
398 return getSrcMsgAux(cast<ObjFile<ELF32LE>>(*this), sym, sec, offset); in getSrcMsg()
400 return getSrcMsgAux(cast<ObjFile<ELF32BE>>(*this), sym, sec, offset); in getSrcMsg()
402 return getSrcMsgAux(cast<ObjFile<ELF64LE>>(*this), sym, sec, offset); in getSrcMsg()
404 return getSrcMsgAux(cast<ObjFile<ELF64BE>>(*this), sym, sec, offset); in getSrcMsg()
523 for (const Elf_Shdr &sec : sections) in findSection() local
524 if (sec.sh_type == type) in findSection()
525 return &sec; in findSection()
604 const Elf_Shdr &sec = objSections[i]; in parse() local
605 if (sec.sh_type == SHT_LLVM_DEPENDENT_LIBRARIES && !config->relocatable) { in parse()
606 StringRef name = check(obj.getSectionName(sec, shstrtab)); in parse()
608 this->getObj().template getSectionContentsAsArray<char>(sec), this); in parse()
625 if (sec.sh_type == SHT_ARM_ATTRIBUTES && config->emachine == EM_ARM) { in parse()
628 check(this->getObj().getSectionContents(sec)); in parse()
629 StringRef name = check(obj.getSectionName(sec, shstrtab)); in parse()
634 InputSection isec(*this, sec, name); in parse()
645 in.attributes = std::make_unique<InputSection>(*this, sec, name); in parse()
655 if (sec.sh_type == SHT_AARCH64_MEMTAG_GLOBALS_STATIC && in parse()
661 if (sec.sh_type != SHT_GROUP) in parse()
663 StringRef signature = getShtGroupSignature(objSections, sec); in parse()
665 CHECK(obj.template getSectionContentsAsArray<Elf_Word>(sec), this); in parse()
680 i, sec, check(obj.getSectionName(sec, shstrtab))); in parse()
702 const Elf_Shdr &sec) { in getShtGroupSignature() argument
704 if (sec.sh_info >= symbols.size()) in getShtGroupSignature()
706 const typename ELFT::Sym &sym = symbols[sec.sh_info]; in getShtGroupSignature()
711 bool ObjFile<ELFT>::shouldMerge(const Elf_Shdr &sec, StringRef name) { in shouldMerge() argument
731 if (sec.sh_size == 0) in shouldMerge()
739 uint64_t entSize = sec.sh_entsize; in shouldMerge()
742 if (sec.sh_size % entSize) in shouldMerge()
744 Twine(sec.sh_size) + ") must be a multiple of sh_entsize (" + in shouldMerge()
747 if (sec.sh_flags & SHF_WRITE) in shouldMerge()
786 const Elf_Shdr &sec = objSections[i]; in initializeSections() local
787 const uint32_t type = sec.sh_type; in initializeSections()
792 if ((sec.sh_flags & SHF_EXCLUDE) && !config->relocatable) { in initializeSections()
800 if (sec.sh_link != 0) in initializeSections()
801 this->addrsigSec = &sec; in initializeSections()
819 cantFail(this->getELFSyms<ELFT>()[sec.sh_info].getName(stringTable)); in initializeSections()
821 cantFail(obj.template getSectionContentsAsArray<Elf_Word>(sec)); in initializeSections()
829 shndxTable = CHECK(obj.getSHNDXTable(sec, objSections), this); in initializeSections()
845 createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections()
859 createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections()
863 !isKnownSpecificSectionType(type, sec.sh_flags)) in initializeSections()
880 const Elf_Shdr &sec = objSections[i]; in initializeSections() local
882 if (isStaticRelSecType(sec.sh_type)) { in initializeSections()
888 const uint32_t info = sec.sh_info; in initializeSections()
917 *this, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections()
928 if (!sec.sh_link || !(sec.sh_flags & SHF_LINK_ORDER)) in initializeSections()
932 if (sec.sh_link < size) in initializeSections()
933 linkSec = this->sections[sec.sh_link]; in initializeSections()
935 fatal(toString(this) + ": invalid sh_link index: " + Twine(sec.sh_link)); in initializeSections()
957 void readGnuProperty(const InputSection &sec, ObjFile<ELFT> &f) { in readGnuProperty() argument
961 ArrayRef<uint8_t> data = sec.content(); in readGnuProperty()
963 fatal(toString(sec.file) + ":(" + sec.name + "+0x" + in readGnuProperty()
964 Twine::utohexstr(place - sec.content().data()) + "): " + msg); in readGnuProperty()
970 data.size() < nhdr->getSize(sec.addralign)) in readGnuProperty()
975 data = data.slice(nhdr->getSize(sec.addralign)); in readGnuProperty()
984 ArrayRef<uint8_t> desc = note.getDesc(sec.addralign); in readGnuProperty()
1021 data = data.slice(nhdr->getSize(sec.addralign)); in readGnuProperty()
1049 const Elf_Shdr &sec, in createInputSection() argument
1077 readGnuProperty<ELFT>(InputSection(*this, sec, name), *this); in createInputSection()
1116 return makeThreadLocal<EhInputSection>(*this, sec, name); in createInputSection()
1118 if ((sec.sh_flags & SHF_MERGE) && shouldMerge(sec, name)) in createInputSection()
1119 return makeThreadLocal<MergeInputSection>(*this, sec, name); in createInputSection()
1120 return makeThreadLocal<InputSection>(*this, sec, name); in createInputSection()
1211 InputSectionBase *sec = sections[secIdx]; in initSectionsAndLocalSyms() local
1220 if (eSym.st_shndx == SHN_UNDEF || sec == &InputSection::discarded) in initSectionsAndLocalSyms()
1225 eSym.st_value, eSym.st_size, sec); in initSectionsAndLocalSyms()
1267 InputSectionBase *sec = sections[secIdx]; in postParse() local
1268 if (sec == &InputSection::discarded) { in postParse()
1282 cast<Defined>(sym).section = sec; in postParse()
1289 ctx.duplicates.push_back({&sym, this, sec, eSym.st_value}); in postParse()
1371 parseVerdefs(const uint8_t *base, const typename ELFT::Shdr *sec) { in parseVerdefs() argument
1372 if (!sec) in parseVerdefs()
1378 const uint8_t *verdef = base + sec->sh_offset; in parseVerdefs()
1379 for (unsigned i = 0, e = sec->sh_info; i != e; ++i) { in parseVerdefs()
1396 const typename ELFT::Shdr *sec) { in parseVerneed() argument
1397 if (!sec) in parseVerneed()
1400 ArrayRef<uint8_t> data = CHECK(obj.getSectionContents(*sec), this); in parseVerneed()
1402 for (unsigned i = 0; i != sec->sh_info; ++i) { in parseVerneed()
1470 for (const Elf_Shdr &sec : sections) { in parse() local
1471 switch (sec.sh_type) { in parse()
1476 CHECK(obj.template getSectionContentsAsArray<Elf_Dyn>(sec), this); in parse()
1479 versymSec = &sec; in parse()
1482 verdefSec = &sec; in parse()
1485 verneedSec = &sec; in parse()