Lines Matching defs:sec
39 std::string elf::toStr(Ctx &ctx, const InputSectionBase *sec) {
40 return (toStr(ctx, sec->file) + ":(" + sec->name + ")").str();
44 const InputSectionBase *sec) {
45 return s << toStr(s.ctx, sec);
122 static void decompressAux(Ctx &ctx, const InputSectionBase &sec, uint8_t *out,
124 auto *hdr = reinterpret_cast<const typename ELFT::Chdr *>(sec.content_);
125 auto compressed = ArrayRef<uint8_t>(sec.content_, sec.compressedSize)
130 Err(ctx) << &sec << ": decompress failed: " << std::move(e);
160 auto *sec = makeThreadLocal<InputSection>(*f, shdr, name);
161 f->cacheDecodedCrel(relSecIdx, sec);
162 sec->type = SHT_RELA;
163 sec->decodedCrel = true;
165 RelocsCrel<ELFT::Is64Bits> entries(sec->content_);
166 sec->size = entries.size() * sizeof(typename ELFT::Rela);
168 sec->content_ = reinterpret_cast<uint8_t *>(relas);
238 InputSection *sec;
240 sec = isec;
242 sec = ms->getParent();
244 sec = eh->getParent();
247 return sec ? sec->getParent() : nullptr;
331 auto &sec = msg.sec;
332 if (sec.file->kind() != InputFile::ObjKind)
334 auto &file = cast<ELFFileBase>(*sec.file);
338 auto it = llvm::find(sections, &sec);
365 auto *sec = msg.sec;
366 s << sec->file->getName() << ":(";
371 if (Defined *d = sec->getEnclosingSymbol(msg.offset))
374 s << sec->name << "+0x" << Twine::utohexstr(msg.offset);
376 if (!sec->file->archiveName.empty())
377 s << (" in archive " + sec->file->archiveName).str();
439 InputSectionBase *sec = getRelocatedSection();
442 llvm::make_range(sec->relocations.begin(), sec->relocations.end()));
474 InputSectionBase *sec = getRelocatedSection();
475 (void)sec->contentMaybeDecompress(); // uncompress if needed
490 p->r_offset = sec->getVA(rel.offset);
509 if (!isDebugSection(*sec) && sec->name != ".eh_frame" &&
510 sec->name != ".gcc_except_table" && sec->name != ".got2" &&
511 sec->name != ".toc") {
513 Elf_Shdr_Impl<ELFT> sec = file->template getELFShdrs<ELFT>()[secIdx];
515 << CHECK2(file->getObj().getSectionName(sec), file)
525 const uint8_t *bufLoc = sec->content().begin() + rel.offset;
542 addend += sec->getFile<ELFT>()->mipsGp0;
549 // sec->relocations so that relocateAlloc transitively called by
552 // this sec->relocations change.
553 else if (ctx.arg.relocatable && (sec->flags & SHF_ALLOC) &&
555 sec->addReloc({R_ABS, type, rel.offset, addend, &sym});
557 p->r_addend >= 0x8000 && sec->file->ppc32Got2) {
563 p->r_addend += sec->file->ppc32Got2->outSecOff;
1177 auto *sec = cast<InputSection>(this);
1180 invokeOnRelocs(*sec, sec->relocateNonAlloc<ELFT>, ctx, buf);