Lines Matching refs:Sec
101 for (InputSectionBase *Sec : InputSections) { in create()
102 if (Sec->Type != SHT_MIPS_ABIFLAGS) in create()
104 Sec->Live = false; in create()
107 std::string Filename = toString(Sec->File); in create()
108 const size_t Size = Sec->data().size(); in create()
117 auto *S = reinterpret_cast<const Elf_Mips_ABIFlags *>(Sec->data().data()); in create()
168 for (InputSectionBase *Sec : InputSections) in create()
169 if (Sec->Type == SHT_MIPS_OPTIONS) in create()
170 Sections.push_back(Sec); in create()
176 for (InputSectionBase *Sec : Sections) { in create()
177 Sec->Live = false; in create()
179 std::string Filename = toString(Sec->File); in create()
180 ArrayRef<uint8_t> D = Sec->data(); in create()
191 Sec->getFile<ELFT>()->MipsGp0 = Opt->getRegInfo().ri_gp_value; in create()
225 for (InputSectionBase *Sec : InputSections) in create()
226 if (Sec->Type == SHT_MIPS_REGINFO) in create()
227 Sections.push_back(Sec); in create()
233 for (InputSectionBase *Sec : Sections) { in create()
234 Sec->Live = false; in create()
236 if (Sec->data().size() != sizeof(Elf_Mips_RegInfo)) { in create()
237 error(toString(Sec->File) + ": invalid size of .reginfo section"); in create()
241 auto *R = reinterpret_cast<const Elf_Mips_RegInfo *>(Sec->data().data()); in create()
243 Sec->getFile<ELFT>()->MipsGp0 = R->ri_gp_value; in create()
254 auto *Sec = make<InputSection>(nullptr, SHF_ALLOC, SHT_PROGBITS, 1, Contents, in createInterpSection() local
256 Sec->Live = true; in createInterpSection()
257 return Sec; in createInterpSection()
376 &Cie.Sec->template getFile<ELFT>()->getRelocTargetSym(Rels[FirstRelI]); in addCie()
394 auto *Sec = cast<EhInputSection>(Fde.Sec); in isFdeLive() local
406 Symbol &B = Sec->template getFile<ELFT>()->getRelocTargetSym(Rel); in isFdeLive()
410 if (SectionBase *Sec = D->Section) in isFdeLive() local
411 return Sec->Live; in isFdeLive()
420 void EhFrameSection::addSectionAux(EhInputSection *Sec, ArrayRef<RelTy> Rels) { in addSectionAux() argument
422 for (EhSectionPiece &Piece : Sec->Pieces) { in addSectionAux()
437 fatal(toString(Sec) + ": invalid CIE reference"); in addSectionAux()
447 auto *Sec = cast<EhInputSection>(C); in addSection() local
448 Sec->Parent = this; in addSection()
450 Alignment = std::max(Alignment, Sec->Alignment); in addSection()
451 Sections.push_back(Sec); in addSection()
453 for (auto *DS : Sec->DependentSections) in addSection()
456 if (Sec->Pieces.empty()) in addSection()
459 if (Sec->AreRelocsRela) in addSection()
460 addSectionAux<ELFT>(Sec, Sec->template relas<ELFT>()); in addSection()
462 addSectionAux<ELFT>(Sec, Sec->template rels<ELFT>()); in addSection()
513 fatal(toString(Fde->Sec) + ": PC offset is too large: 0x" + in getFdeData()
1232 void DynamicSection<ELFT>::addInSec(int32_t Tag, InputSection *Sec) { in addInSec() argument
1233 Entries.push_back({Tag, [=] { return Sec->getVA(0); }}); in addInSec()
1237 void DynamicSection<ELFT>::addInSecRelative(int32_t Tag, InputSection *Sec) { in addInSecRelative() argument
1240 {Tag, [=] { return Sec->getVA(0) - (getVA() + TagOffset); }}); in addInSecRelative()
1244 void DynamicSection<ELFT>::addOutSec(int32_t Tag, OutputSection *Sec) { in addOutSec() argument
1245 Entries.push_back({Tag, [=] { return Sec->Addr; }}); in addOutSec()
1249 void DynamicSection<ELFT>::addSize(int32_t Tag, OutputSection *Sec) { in addSize() argument
1250 Entries.push_back({Tag, [=] { return Sec->Size; }}); in addSize()
1318 if (OutputSection *Sec = In.DynStrTab->getParent()) in finalizeContents() local
1319 this->Link = Sec->SectionIndex; in finalizeContents()
1875 if (OutputSection *Sec = StrTabSec.getParent()) in finalizeContents() local
1876 getParent()->Link = Sec->SectionIndex; in finalizeContents()
2141 if (OutputSection *Sec = In.DynSymTab->getParent()) in finalizeContents() local
2142 getParent()->Link = Sec->SectionIndex; in finalizeContents()
2274 if (OutputSection *Sec = In.DynSymTab->getParent()) in finalizeContents() local
2275 getParent()->Link = Sec->SectionIndex; in finalizeContents()
2421 readAddressAreas(DWARFContext &Dwarf, InputSection *Sec) { in readAddressAreas() argument
2428 error(toString(Sec) + ": " + toString(Ranges.takeError())); in readAddressAreas()
2432 ArrayRef<InputSectionBase *> Sections = Sec->File->getSections(); in readAddressAreas()
2577 Chunks[I].Sec = Sections[I]; in create()
2603 write64le(Buf, Chunk.Sec->OutSecOff + Cu.CuOffset); in writeTo()
2711 if (OutputSection *Sec = In.DynStrTab->getParent()) in finalizeContents() local
2712 getParent()->Link = Sec->SectionIndex; in finalizeContents()
2856 if (OutputSection *Sec = In.DynStrTab->getParent()) in finalizeContents() local
2857 getParent()->Link = Sec->SectionIndex; in finalizeContents()
2889 for (MergeInputSection *Sec : Sections) in finalizeContents()
2890 for (size_t I = 0, E = Sec->Pieces.size(); I != E; ++I) in finalizeContents()
2891 if (Sec->Pieces[I].Live) in finalizeContents()
2892 Builder.add(Sec->getData(I)); in finalizeContents()
2900 for (MergeInputSection *Sec : Sections) in finalizeContents()
2901 for (size_t I = 0, E = Sec->Pieces.size(); I != E; ++I) in finalizeContents()
2902 if (Sec->Pieces[I].Live) in finalizeContents()
2903 Sec->Pieces[I].OutputOff = Builder.getOffset(Sec->getData(I)); in finalizeContents()
2933 for (MergeInputSection *Sec : Sections) { in finalizeContents()
2934 for (size_t I = 0, E = Sec->Pieces.size(); I != E; ++I) { in finalizeContents()
2935 size_t ShardId = getShardId(Sec->Pieces[I].Hash); in finalizeContents()
2936 if ((ShardId & (Concurrency - 1)) == ThreadId && Sec->Pieces[I].Live) in finalizeContents()
2937 Sec->Pieces[I].OutputOff = Shards[ShardId].add(Sec->getData(I)); in finalizeContents()
2955 parallelForEach(Sections, [&](MergeInputSection *Sec) { in finalizeContents() argument
2956 for (size_t I = 0, E = Sec->Pieces.size(); I != E; ++I) in finalizeContents()
2957 if (Sec->Pieces[I].Live) in finalizeContents()
2958 Sec->Pieces[I].OutputOff += in finalizeContents()
2959 ShardOffsets[getShardId(Sec->Pieces[I].Hash)]; in finalizeContents()
2976 parallelForEach(InputSections, [](InputSectionBase *Sec) { in splitSections() argument
2977 if (auto *S = dyn_cast<MergeInputSection>(Sec)) in splitSections()
2979 else if (auto *Eh = dyn_cast<EhInputSection>(Sec)) in splitSections()
3008 auto I = llvm::find_if(MergeSections, [=](MergeSyntheticSection *Sec) { in mergeSections() argument
3017 return Sec->Name == OutsecName && Sec->Flags == MS->Flags && in mergeSections()
3018 Sec->Entsize == MS->Entsize && Sec->Alignment == Alignment; in mergeSections()