Lines Matching defs:sec

477   for (const Elf_Shdr &sec : sections)
478 if (sec.sh_type == type)
479 return &sec;
558 const Elf_Shdr &sec = objSections[i];
559 if (LLVM_LIKELY(sec.sh_type == SHT_PROGBITS))
561 if (LLVM_LIKELY(sec.sh_type == SHT_GROUP)) {
562 StringRef signature = getShtGroupSignature(objSections, sec);
564 CHECK2(obj.template getSectionContentsAsArray<Elf_Word>(sec), this);
579 i, sec, check(obj.getSectionName(sec, shstrtab)));
592 if (sec.sh_type == SHT_LLVM_DEPENDENT_LIBRARIES && !ctx.arg.relocatable) {
593 StringRef name = check(obj.getSectionName(sec, shstrtab));
595 this->getObj().template getSectionContentsAsArray<char>(sec), this);
614 if (sec.sh_type == SHT_ARM_ATTRIBUTES) {
617 check(this->getObj().getSectionContents(sec));
618 StringRef name = check(obj.getSectionName(sec, shstrtab));
623 InputSection isec(*this, sec, name);
635 std::make_unique<InputSection>(*this, sec, name);
646 if (sec.sh_type == SHT_AARCH64_MEMTAG_GLOBALS_STATIC &&
662 const Elf_Shdr &sec) {
664 if (sec.sh_info >= symbols.size())
666 const typename ELFT::Sym &sym = symbols[sec.sh_info];
671 bool ObjFile<ELFT>::shouldMerge(const Elf_Shdr &sec, StringRef name) {
691 if (sec.sh_size == 0)
699 uint64_t entSize = sec.sh_entsize;
702 if (sec.sh_size % entSize)
704 << uint64_t(sec.sh_size)
706 if (sec.sh_flags & SHF_WRITE)
745 const Elf_Shdr &sec = objSections[i];
746 const uint32_t type = sec.sh_type;
751 if ((sec.sh_flags & SHF_EXCLUDE) && !ctx.arg.relocatable) {
759 if (sec.sh_link != 0)
760 this->addrsigSec = &sec;
778 cantFail(this->getELFSyms<ELFT>()[sec.sh_info].getName(stringTable));
780 cantFail(obj.template getSectionContentsAsArray<Elf_Word>(sec));
788 shndxTable = CHECK2(obj.getSHNDXTable(sec, objSections), this);
804 createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab)));
818 createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab)));
822 !isKnownSpecificSectionType(type, sec.sh_flags))
839 const Elf_Shdr &sec = objSections[i];
841 if (isStaticRelSecType(sec.sh_type)) {
847 const uint32_t info = sec.sh_info;
876 *this, sec, check(obj.getSectionName(sec, shstrtab)));
887 if (!sec.sh_link || !(sec.sh_flags & SHF_LINK_ORDER))
891 if (sec.sh_link < size)
892 linkSec = this->sections[sec.sh_link];
895 << ": invalid sh_link index: " << uint32_t(sec.sh_link);
920 static void readGnuProperty(Ctx &ctx, const InputSection &sec,
925 ArrayRef<uint8_t> data = sec.content();
928 diag << sec.file << ":(" << sec.name << "+0x"
929 << Twine::utohexstr(place - sec.content().data()) << "): ";
936 data.size() < nhdr->getSize(sec.addralign))
941 data = data.slice(nhdr->getSize(sec.addralign));
950 ArrayRef<uint8_t> desc = note.getDesc(sec.addralign);
989 data = data.slice(nhdr->getSize(sec.addralign));
1017 const Elf_Shdr &sec,
1036 if ((sec.sh_flags & SHF_EXECINSTR) && !ctx.arg.relocatable &&
1054 readGnuProperty<ELFT>(ctx, InputSection(*this, sec, name), *this);
1093 return makeThreadLocal<EhInputSection>(*this, sec, name);
1095 if ((sec.sh_flags & SHF_MERGE) && shouldMerge(sec, name))
1096 return makeThreadLocal<MergeInputSection>(*this, sec, name);
1097 return makeThreadLocal<InputSection>(*this, sec, name);
1189 InputSectionBase *sec = sections[secIdx];
1201 if (eSym.st_shndx == SHN_UNDEF || sec == &InputSection::discarded)
1206 eSym.st_value, eSym.st_size, sec);
1253 InputSectionBase *sec = sections[secIdx];
1254 if (sec == &InputSection::discarded) {
1268 cast<Defined>(sym).section = sec;
1275 ctx.duplicates.push_back({&sym, this, sec, eSym.st_value});
1355 parseVerdefs(const uint8_t *base, const typename ELFT::Shdr *sec) {
1356 if (!sec)
1362 const uint8_t *verdef = base + sec->sh_offset;
1363 for (unsigned i = 0, e = sec->sh_info; i != e; ++i) {
1380 const typename ELFT::Shdr *sec) {
1381 if (!sec)
1384 ArrayRef<uint8_t> data = CHECK2(obj.getSectionContents(*sec), this);
1386 for (unsigned i = 0; i != sec->sh_info; ++i) {
1461 for (const Elf_Shdr &sec : sections) {
1462 switch (sec.sh_type) {
1467 CHECK2(obj.template getSectionContentsAsArray<Elf_Dyn>(sec), this);
1470 versymSec = &sec;
1473 verdefSec = &sec;
1476 verneedSec = &sec;