Lines Matching defs:sec

91   auto *sec =
94 sec->splitIntoPieces();
95 return sec;
117 for (InputSectionBase *sec : ctx.inputSections) {
118 if (sec->type != SHT_MIPS_ABIFLAGS)
120 sec->markDead();
123 const size_t size = sec->content().size();
128 Err(ctx) << sec->file << ": invalid size of .MIPS.abiflags section: got "
133 reinterpret_cast<const Elf_Mips_ABIFlags *>(sec->content().data());
135 Err(ctx) << sec->file << ": unexpected .MIPS.abiflags version "
152 elf::getMipsFpAbiFlag(ctx, sec->file, flags.fp_abi, s->fp_abi);
186 for (InputSectionBase *sec : ctx.inputSections)
187 if (sec->type == SHT_MIPS_OPTIONS)
188 sections.push_back(sec);
194 for (InputSectionBase *sec : sections) {
195 sec->markDead();
197 ArrayRef<uint8_t> d = sec->content();
200 Err(ctx) << sec->file << ": invalid size of .MIPS.options section";
207 sec->getFile<ELFT>()->mipsGp0 = opt->getRegInfo().ri_gp_value;
212 Err(ctx) << sec->file << ": zero option descriptor size";
244 for (InputSectionBase *sec : ctx.inputSections)
245 if (sec->type == SHT_MIPS_REGINFO)
246 sections.push_back(sec);
252 for (InputSectionBase *sec : sections) {
253 sec->markDead();
255 if (sec->content().size() != sizeof(Elf_Mips_RegInfo)) {
256 Err(ctx) << sec->file << ": invalid size of .reginfo section";
260 auto *r = reinterpret_cast<const Elf_Mips_RegInfo *>(sec->content().data());
262 sec->getFile<ELFT>()->mipsGp0 = r->ri_gp_value;
401 personality = &cie.sec->file->getRelocTargetSym(rels[firstRelI]);
419 auto *sec = cast<EhInputSection>(fde.sec);
431 Symbol &b = sec->file->getRelocTargetSym(rel);
446 void EhFrameSection::addRecords(EhInputSection *sec, ArrayRef<RelTy> rels) {
448 for (EhSectionPiece &cie : sec->cies)
450 for (EhSectionPiece &fde : sec->fdes) {
454 Fatal(ctx) << sec << ": invalid CIE reference";
464 void EhFrameSection::addSectionAux(EhInputSection *sec) {
465 if (!sec->isLive())
468 sec->template relsOrRelas<ELFT>(/*supportsCrel=*/false);
470 addRecords<ELFT>(sec, rels.rels);
472 addRecords<ELFT>(sec, rels.relas);
479 EhInputSection &sec, ArrayRef<RelTy> rels, DenseSet<size_t> &ciesWithLSDA,
481 for (EhSectionPiece &cie : sec.cies)
484 for (EhSectionPiece &fde : sec.fdes) {
500 for (EhInputSection *sec : sections) {
503 sec->template relsOrRelas<ELFT>(/*supportsCrel=*/false);
505 iterateFDEWithLSDAAux<ELFT>(*sec, rels.rels, ciesWithLSDA, fn);
507 iterateFDEWithLSDAAux<ELFT>(*sec, rels.relas, ciesWithLSDA, fn);
524 for (EhInputSection *sec : sections)
525 addSectionAux<ELF32LE>(sec);
528 for (EhInputSection *sec : sections)
529 addSectionAux<ELF32BE>(sec);
532 for (EhInputSection *sec : sections)
533 addSectionAux<ELF64LE>(sec);
536 for (EhInputSection *sec : sections)
537 addSectionAux<ELF64BE>(sec);
575 Err(ctx) << fde->sec << ": PC offset is too large: 0x"
1364 auto addInSec = [&](int32_t tag, const InputSection &sec) {
1365 entries.emplace_back(tag, sec.getVA());
1618 if (OutputSection *sec = getPartition(ctx).dynStrTab->getParent())
1619 getParent()->link = sec->sectionIndex;
2179 if (OutputSection *sec = strTabSec.getParent())
2180 getParent()->link = sec->sectionIndex;
2448 if (OutputSection *sec = getPartition(ctx).dynSymTab->getParent())
2449 getParent()->link = sec->sectionIndex;
2561 if (OutputSection *sec = symTab->getParent())
2562 getParent()->link = sec->sectionIndex;
2607 name = ".plt.sec";
2735 // the former code is written to .plt.sec, and the latter code is written to
2739 // that the regular .plt is now called .plt.sec and .plt is repurposed to
2743 // supposed to jump to .plt.sec to call an external function. Each .plt.sec
2750 // to a desired location from .plt.sec.
2756 // code (.plt.sec) from cold code (.plt). But as far as I know no one proved
2911 Err(ctx) << namesSec.sec
2916 Err(ctx) << namesSec.sec << ": unsupported version: " << nd.hdr.Version;
2922 Err(ctx) << namesSec.sec << ": entry pool start is beyond end of section";
2947 Err(ctx) << namesSec.sec << ": " << ieOrErr.takeError();
2953 Err(ctx) << namesSec.sec << ": index entry is out of bounds";
3002 Warn(ctx) << inputChunk.section.sec
3251 Err(ctx) << dobj.getNamesSection().sec << ": " << std::move(e);
3291 InputSection *sec = inputSections[i];
3292 invokeOnRelocs(*sec, getNameRelocs, *sec->file, relocs.get()[i]);
3414 readAddressAreas(Ctx &ctx, DWARFContext &dwarf, InputSection *sec) {
3420 Warn(ctx) << sec << ": " << std::move(e);
3425 Warn(ctx) << sec << ": " << ranges.takeError();
3429 ArrayRef<InputSectionBase *> sections = sec->file->getSections();
3458 Warn(ctx) << pub->sec << ": " << std::move(e);
3600 chunks[i].sec = dobj.getInfoSection();
3602 chunks[i].addressAreas = readAddressAreas(ctx, dwarf, chunks[i].sec);
3632 write64le(buf, chunk.sec->outSecOff + cu.cuOffset);
3754 if (OutputSection *sec = getPartition(ctx).dynStrTab->getParent())
3755 getParent()->link = sec->sectionIndex;
3881 if (OutputSection *sec = getPartition(ctx).dynStrTab->getParent())
3882 getParent()->link = sec->sectionIndex;
3944 for (MergeInputSection *sec : sections)
3945 for (size_t i = 0, e = sec->pieces.size(); i != e; ++i)
3946 if (sec->pieces[i].live)
3947 builder.add(sec->getData(i));
3955 for (MergeInputSection *sec : sections)
3956 for (size_t i = 0, e = sec->pieces.size(); i != e; ++i)
3957 if (sec->pieces[i].live)
3958 sec->pieces[i].outputOff = builder.getOffset(sec->getData(i));
3986 for (MergeInputSection *sec : sections) {
3987 for (size_t i = 0, e = sec->pieces.size(); i != e; ++i) {
3988 if (!sec->pieces[i].live)
3990 size_t shardId = getShardId(sec->pieces[i].hash);
3992 sec->pieces[i].outputOff = shards[shardId].add(sec->getData(i));
4010 parallelForEach(sections, [&](MergeInputSection *sec) {
4011 for (size_t i = 0, e = sec->pieces.size(); i != e; ++i)
4012 if (sec->pieces[i].live)
4013 sec->pieces[i].outputOff +=
4014 shardOffsets[getShardId(sec->pieces[i].hash)];
4023 for (InputSectionBase *sec : file->getSections()) {
4024 if (!sec)
4026 if (auto *s = dyn_cast<MergeInputSection>(sec))
4028 else if (auto *eh = dyn_cast<EhInputSection>(sec))
4036 for (EhInputSection *sec : ctx.ehInputSections) {
4037 EhFrameSection &eh = *sec->getPartition(ctx).ehFrame;
4038 sec->parent = &eh;
4039 eh.addralign = std::max(eh.addralign, sec->addralign);
4040 eh.sections.push_back(sec);
4041 llvm::append_range(eh.dependentSections, sec->dependentSections);
4687 static Defined *addOptionalRegular(Ctx &ctx, StringRef name, SectionBase *sec,
4695 /*size=*/0, sec});
4706 InputSection *sec = createInterpSection(ctx);
4707 sec->partition = i;
4708 ctx.inputSections.push_back(sec);
4712 auto add = [&](SyntheticSection &sec) { ctx.inputSections.push_back(&sec); };
4759 auto add = [&](SyntheticSection &sec) {
4760 sec.partition = part.getNumber(ctx);
4761 ctx.inputSections.push_back(&sec);