Home
last modified time | relevance | path

Searched refs:Sec (Results 1 – 25 of 125) sorted by relevance

12345

/freebsd-12.1/contrib/llvm/tools/lld/ELF/
H A DMarkLive.cpp87 Fn(Sec, 0); in resolveReloc()
148 if (Sec && Sec != &InputSection::Discarded && in scanEhFrameSection()
173 switch (Sec->Type) { in isReserved()
209 if (Sec->Live) in doGcSections()
211 Sec->Live = true; in doGcSections()
254 if (isReserved<ELFT>(Sec) || Script->shouldKeep(Sec)) { in doGcSections()
255 Enqueue(Sec, 0); in doGcSections()
257 CNamedSections[Saver.save("__start_" + Sec->Name)].push_back(Sec); in doGcSections()
258 CNamedSections[Saver.save("__stop_" + Sec->Name)].push_back(Sec); in doGcSections()
306 bool IsRel = (Sec->Type == SHT_REL || Sec->Type == SHT_RELA); in markLive()
[all …]
H A DLinkerScript.cpp61 if (Sec) in getValue()
68 if (Sec) in getSecAddr()
69 return Sec->getOffset(0) + getOutputSectionVA(Sec, Loc); in getSecAddr()
77 if (Alignment == 1 && (!Sec || !Sec->getOutputSection())) in getSectionOffset()
95 return Sec; in createOutputSection()
385 if (!Sec->Live || Sec->Assigned) in computeInputSections()
545 return Sec; in createSection()
629 if (Sec) { in addInputSec()
635 return Sec; in addInputSec()
767 setDot(Sec->AddrExpr, Sec->Location, false); in assignOffsets()
[all …]
H A DDWARF.cpp31 if (!Sec) in LLDDwarfObj()
44 M->Data = toStringRef(Sec->data()); in LLDDwarfObj()
45 M->Sec = Sec; in LLDDwarfObj()
49 if (Sec->Name == ".debug_abbrev") in LLDDwarfObj()
50 AbbrevSection = toStringRef(Sec->data()); in LLDDwarfObj()
51 else if (Sec->Name == ".debug_str") in LLDDwarfObj()
52 StrSection = toStringRef(Sec->data()); in LLDDwarfObj()
53 else if (Sec->Name == ".debug_line_str") in LLDDwarfObj()
101 if (Sec.Sec->AreRelocsRela) in find()
102 return findAux(*Sec.Sec, Pos, Sec.Sec->template relas<ELFT>()); in find()
[all …]
H A DWriter.cpp566 return !Sec || !(Sec->Flags & SHF_MERGE); in shouldKeepInSymtab()
578 Sec = Sec->Repl; in includeInSymtab()
1553 if (Sec && !Sec->empty() && Sec->getParent()) in finalizeSynthetic()
2186 if ((Sec->Offset > FileSize) || (Sec->Offset + Sec->Size > FileSize)) in assignFileOffsets()
2308 if (Sec->Size > 0 && (Sec->Flags & SHF_ALLOC) && !(Sec->Flags & SHF_TLS)) in checkSections()
2309 VMAs.push_back({Sec, Sec->Addr}); in checkSections()
2317 if (Sec->Size > 0 && (Sec->Flags & SHF_ALLOC) && !(Sec->Flags & SHF_TLS)) in checkSections()
2318 LMAs.push_back({Sec, Sec->getLMA()}); in checkSections()
2470 Sec->writeTo<ELFT>(Buf + Sec->Offset); in writeSectionsBinary()
2520 Sec->writeTo<ELFT>(Buf + Sec->Offset); in writeSections()
[all …]
H A DInputFiles.cpp343 if (Sec.sh_size == 0) in shouldMerge()
354 if (Sec.sh_size % EntSize) in shouldMerge()
407 &Sec)); in initializeSections()
418 if (Sec.sh_link != 0) in initializeSections()
428 switch (Sec.sh_type) { in initializeSections()
604 return make<InputSection>(Sec->File, Sec->Flags, Sec->Type, Sec->Alignment, in toRegularSection()
605 Sec->data(), Sec->Name); in toRegularSection()
612 switch (Sec.sh_type) { in createInputSection()
757 if (shouldMerge(Sec)) in createInputSection()
875 switch (Sec.sh_type) { in parseDynamic()
[all …]
H A DRelocations.cpp578 In.Bss->getParent()->addSection(Sec); in addCopyRelSymbol()
598 return Sec.getFile<ELFT>()->MipsGp0; in computeMipsAddend()
610 const uint8_t *Buf = Sec.data().data(); in computeMipsAddend()
638 const uint8_t *Buf = Sec.data().data(); in computeAddend()
668 Msg += Sec.getObjMsg(Offset); in maybeReportUndefined()
900 getLocation(Sec, Sym, Offset)); in processRelocAux()
918 getLocation(Sec, Sym, Offset)); in processRelocAux()
1031 getLocation(Sec, Sym, Offset)); in scanReloc()
1087 OffsetGetter GetOffset(Sec); in scanRelocs()
1090 Sec.Relocations.reserve(Rels.size()); in scanRelocs()
[all …]
H A DSyntheticSections.cpp104 Sec->Live = false; in create()
177 Sec->Live = false; in create()
234 Sec->Live = false; in create()
256 Sec->Live = true; in createInterpSection()
257 return Sec; in createInterpSection()
394 auto *Sec = cast<EhInputSection>(Fde.Sec); in isFdeLive() local
448 Sec->Parent = this; in addSection()
460 addSectionAux<ELFT>(Sec, Sec->template relas<ELFT>()); in addSection()
462 addSectionAux<ELFT>(Sec, Sec->template rels<ELFT>()); in addSection()
2903 Sec->Pieces[I].OutputOff = Builder.getOffset(Sec->getData(I)); in finalizeContents()
[all …]
H A DLinkerScript.h43 ExprValue(SectionBase *Sec, bool ForceAbsolute, uint64_t Val, in ExprValue()
45 : Sec(Sec), ForceAbsolute(ForceAbsolute), Val(Val), Loc(Loc.str()) {} in ExprValue()
49 bool isAbsolute() const { return ForceAbsolute || Sec == nullptr; } in isAbsolute()
55 SectionBase *Sec; member
236 std::vector<size_t> getPhdrIndices(OutputSection *Sec);
238 MemoryRegion *findMemoryRegion(OutputSection *Sec);
240 void switchTo(OutputSection *Sec);
242 void output(InputSection *Sec);
244 void assignOffsets(OutputSection *Sec);
/freebsd-12.1/contrib/llvm/tools/llvm-objcopy/ELF/
H A DELFObjcopy.cpp58 StringRef(Sec.Name).startswith(".zdebug") || Sec.Name == ".gdb_index"; in isDebugSection()
71 return !isDWOSection(Sec); in onlyKeepDWOPred()
175 [&](const SectionBase &Sec) { return onlyKeepDWOPred(*DWOFile, Sec); }); in splitDWOToFile() argument
197 std::copy(Sec.OriginalData.begin(), Sec.OriginalData.end(), in dumpSectionToFile()
249 return shouldReplace(Sec) || RemovePred(Sec); in replaceDebugSections()
358 return isDWOSection(Sec) || RemovePred(Sec); in handleArgs()
363 return onlyKeepDWOPred(Obj, Sec) || RemovePred(Sec); in handleArgs()
386 return RemovePred(Sec) || (Sec.Flags & SHF_ALLOC) == 0; in handleArgs()
392 return RemovePred(Sec) || isDebugSection(Sec); in handleArgs()
457 if (&Sec == Obj.SymbolTable || &Sec == Obj.SymbolTable->getStrTab()) in handleArgs()
[all …]
H A DObject.cpp88 Sec.Size = Sec.Symbols.size() * Sec.EntrySize; in visit()
95 Sec.EntrySize = Sec.Type == SHT_REL ? sizeof(Elf_Rel) : sizeof(Elf_Rela); in visit()
96 Sec.Size = Sec.Relocations.size() * Sec.EntrySize; in visit()
180 std::copy(Sec.OriginalData.begin(), Sec.OriginalData.end(), Buf); in visit()
227 Buf += Sec.Offset; in visit()
230 std::copy(Sec.OriginalData.begin(), Sec.OriginalData.end(), Buf); in visit()
251 std::copy(Sec.CompressedData.begin(), Sec.CompressedData.end(), Buf); in visit()
314 Sec.StrTabBuilder.write(Out.getBufferStart() + Sec.Offset); in visit()
515 Buf += Sec.Offset; in visit()
716 *CRC = Sec.CRC32; in visit()
[all …]
H A DObject.h93 virtual void visit(Section &Sec) = 0;
157 void visit(Section &Sec) override;
164 void visit(GroupSection &Sec) override;
323 void removeSection(const SectionBase *Sec) { Sections.erase(Sec); } in removeSection() argument
324 void addSection(const SectionBase *Sec) { Sections.insert(Sec); } in addSection() argument
392 : SectionBase(Sec) { in DecompressedSection()
393 Size = Sec.getDecompressedSize(); in DecompressedSection()
394 Align = Sec.getDecompressedAlign(); in DecompressedSection()
559 void setSection(SectionBase *Sec) { SecToApplyRel = Sec; } in setSection() argument
622 void addMember(SectionBase *Sec) { GroupMembers.push_back(Sec); } in addMember() argument
[all …]
/freebsd-12.1/contrib/llvm/include/llvm/Object/
H A DELFObjectFile.h449 return getSection(Sec)->sh_flags; in getSectionFlags()
454 return getSection(Sec)->sh_type; in getSectionType()
459 return getSection(Sec)->sh_offset; in getSectionOffset()
634 DataRefImpl Sec; in getSymbolSection() local
653 Sec = toDRI(++ESec); in moveSectionNext()
668 return getSection(Sec)->sh_addr; in getSectionAddress()
679 return getSection(Sec) - First; in getSectionIndex()
684 return getSection(Sec)->sh_size; in getSectionSize()
926 switch (Sec.sh_type) { in create()
930 DotDynSymSec = &Sec; in create()
[all …]
H A DELF.h144 if (!Sec) in symbols()
146 return getSectionContentsAsArray<Elf_Sym>(Sec); in symbols()
154 return getSectionContentsAsArray<Elf_Rel>(Sec); in rels()
346 auto SymtabOrErr = symbols(Sec); in getSymbol()
359 uintX_t Offset = Sec->sh_offset; in getSectionContentsAsArray()
360 uintX_t Size = Sec->sh_size; in getSectionContentsAsArray()
378 return getSectionContentsAsArray<uint8_t>(Sec); in getSectionContents()
530 for (auto &Sec : *TableOrErr) { in getSection()
531 auto SecNameOrErr = getSectionName(&Sec); in getSection()
535 return &Sec; in getSection()
[all …]
H A DWasm.h171 void moveSectionNext(DataRefImpl &Sec) const override;
172 std::error_code getSectionName(DataRefImpl Sec,
175 uint64_t getSectionIndex(DataRefImpl Sec) const override;
176 uint64_t getSectionSize(DataRefImpl Sec) const override;
177 std::error_code getSectionContents(DataRefImpl Sec,
181 bool isSectionText(DataRefImpl Sec) const override;
182 bool isSectionData(DataRefImpl Sec) const override;
183 bool isSectionBSS(DataRefImpl Sec) const override;
184 bool isSectionVirtual(DataRefImpl Sec) const override;
185 bool isSectionBitcode(DataRefImpl Sec) const override;
[all …]
H A DObjectFile.h236 virtual void moveSectionNext(DataRefImpl &Sec) const = 0;
237 virtual std::error_code getSectionName(DataRefImpl Sec,
241 virtual uint64_t getSectionSize(DataRefImpl Sec) const = 0;
246 virtual bool isSectionText(DataRefImpl Sec) const = 0;
247 virtual bool isSectionData(DataRefImpl Sec) const = 0;
248 virtual bool isSectionBSS(DataRefImpl Sec) const = 0;
250 virtual bool isSectionVirtual(DataRefImpl Sec) const = 0;
251 virtual bool isSectionBitcode(DataRefImpl Sec) const;
252 virtual bool isSectionStripped(DataRefImpl Sec) const;
253 virtual bool isBerkeleyText(DataRefImpl Sec) const;
[all …]
/freebsd-12.1/contrib/llvm/include/llvm/MC/
H A DMCFragment.h120 explicit MCDummyFragment(MCSection *Sec) : MCFragment(FT_Dummy, false, Sec) {} in MCDummyFragment() argument
136 MCSection *Sec) in MCEncodedFragment() argument
137 : MCFragment(FType, HasInstructions, Sec) {} in MCEncodedFragment()
194 MCSection *Sec) in MCEncodedFragmentWithContents() argument
215 MCSection *Sec) in MCEncodedFragmentWithFixups() argument
244 MCDataFragment(MCSection *Sec = nullptr)
278 MCSection *Sec = nullptr)
380 MCPaddingFragment(MCSection *Sec = nullptr)
440 SMLoc Loc, MCSection *Sec = nullptr)
467 MCSection *Sec = nullptr)
[all …]
/freebsd-12.1/contrib/llvm/lib/Target/Mips/MCTargetDesc/
H A DMipsOptionRecord.cpp37 MCSectionELF *Sec = in EmitMipsOptionRecord() local
40 MCA.registerSection(*Sec); in EmitMipsOptionRecord()
41 Sec->setAlignment(8); in EmitMipsOptionRecord()
42 Streamer->SwitchSection(Sec); in EmitMipsOptionRecord()
56 MCSectionELF *Sec = Context.getELFSection(".reginfo", ELF::SHT_MIPS_REGINFO, in EmitMipsOptionRecord() local
58 MCA.registerSection(*Sec); in EmitMipsOptionRecord()
59 Sec->setAlignment(MTS->getABI().IsN32() ? 8 : 4); in EmitMipsOptionRecord()
60 Streamer->SwitchSection(Sec); in EmitMipsOptionRecord()
/freebsd-12.1/contrib/llvm/lib/MC/
H A DWinCOFFObjectWriter.cpp260 switch (Sec.getAlignment()) { in getAlignment()
361 COFFSection *Sec = nullptr; in DefineSymbol() local
376 if (!Sec) in DefineSymbol()
379 WeakDefault->Section = Sec; in DefineSymbol()
396 Sym->Section = Sec; in DefineSymbol()
617 if (Sec.Number == -1) in writeSection()
636 if (Sec.Relocations.empty()) { in writeSection()
903 if (Sec->Number == -1) in assignFileOffsets()
908 if (IsPhysicalSection(Sec)) { in assignFileOffsets()
913 if (!Sec->Relocations.empty()) { in assignFileOffsets()
[all …]
H A DMCFragment.cpp35 for (MCSection &Sec : Asm) in MCAsmLayout()
36 if (!Sec.isVirtualSection()) in MCAsmLayout()
37 SectionOrder.push_back(&Sec); in MCAsmLayout()
38 for (MCSection &Sec : Asm) in MCAsmLayout()
39 if (Sec.isVirtualSection()) in MCAsmLayout()
40 SectionOrder.push_back(&Sec); in MCAsmLayout()
44 const MCSection *Sec = F->getParent(); in isFragmentValid() local
63 MCSection *Sec = F->getParent(); in ensureValid() local
68 I = Sec->begin(); in ensureValid()
184 if (Sec->isVirtualSection()) in getSectionFileSize()
[all …]
H A DMachObjectWriter.cpp121 uint64_t EndAddr = getSectionAddress(Sec) + Layout.getSectionAddressSize(Sec); in getPaddingSize()
122 unsigned Next = Sec->getLayoutOrder() + 1; in getPaddingSize()
631 SectionAddress[Sec] = StartAddress; in computeSectionAddresses()
803 for (const MCSection &Sec : Asm) { in writeObject() local
807 FileSize += getPaddingSize(&Sec, Layout); in writeObject()
811 if (Sec.isVirtualSection()) in writeObject()
840 if (Sec.hasInstructions()) in writeObject()
842 writeSection(Layout, Sec, getSectionAddress(&Sec), SectionStart, Flags, in writeObject()
936 for (const MCSection &Sec : Asm) { in writeObject() local
937 Asm.writeSectionData(W.OS, &Sec, Layout); in writeObject()
[all …]
/freebsd-12.1/contrib/llvm/tools/lld/COFF/
H A DWriter.cpp462 Sec->OrigChunks = Sec->Chunks; in finalizeAddresses()
495 Sec->Chunks = Sec->OrigChunks; in finalizeAddresses()
576 if (Sec->Sym) in sortBySectionOrder()
705 if (!Sec) { in createSections()
709 return Sec; in createSections()
779 Sec->addChunk(C); in createSections()
1009 Sec->setStringTableOff(addEntryToStringTable(Sec->Name)); in createSymbolAndStringTable()
1071 for_each(parallel::par, Sec->Chunks.begin(), Sec->Chunks.end(), in readRelocTargets()
1088 if (Sec == RelocSec) in assignAddresses()
1605 for_each(parallel::par, Sec->Chunks.begin(), Sec->Chunks.end(), in writeSections()
[all …]
/freebsd-12.1/contrib/llvm/lib/Object/
H A DCOFFObjectFile.cpp254 const coff_section *Sec = nullptr; in getSymbolSection() local
269 Sec += 1; in moveSectionNext()
276 return getSectionName(Sec, Result); in getSectionName()
290 return toSec(Sec) - SectionTable; in getSectionIndex()
308 return Sec->getAlignment(); in getSectionAlignment()
344 return Sec->PointerToRawData == 0; in isSectionVirtual()
361 return Sec->NumberOfRelocations; in getNumberOfRelocations()
1083 Name = Sec->Name; in getSectionName()
1118 return std::min(Sec->VirtualSize, Sec->SizeOfRawData); in getSectionSize()
1119 return Sec->SizeOfRawData; in getSectionSize()
[all …]
H A DObjectFile.cpp71 bool ObjectFile::isSectionBitcode(DataRefImpl Sec) const { in isSectionBitcode()
73 if (!getSectionName(Sec, SectName)) in isSectionBitcode()
78 bool ObjectFile::isSectionStripped(DataRefImpl Sec) const { return false; } in isSectionStripped()
80 bool ObjectFile::isBerkeleyText(DataRefImpl Sec) const { in isBerkeleyText()
81 return isSectionText(Sec); in isBerkeleyText()
84 bool ObjectFile::isBerkeleyData(DataRefImpl Sec) const { in isBerkeleyData()
85 return isSectionData(Sec); in isBerkeleyData()
88 section_iterator ObjectFile::getRelocatedSection(DataRefImpl Sec) const { in getRelocatedSection()
89 return section_iterator(SectionRef(Sec, this)); in getRelocatedSection()
H A DSymbolSize.cpp28 static unsigned getSectionID(const ObjectFile &O, SectionRef Sec) { in getSectionID() argument
30 return M->getSectionID(Sec); in getSectionID()
31 return cast<COFFObjectFile>(O).getSectionID(Sec); in getSectionID()
63 for (SectionRef Sec : O.sections()) { in computeSymbolSizes() local
64 uint64_t Address = Sec.getAddress(); in computeSymbolSizes()
65 uint64_t Size = Sec.getSize(); in computeSymbolSizes()
67 {O.symbol_end(), Address + Size, 0, getSectionID(O, Sec)}); in computeSymbolSizes()
/freebsd-12.1/contrib/llvm/tools/llvm-readobj/
H A DELFDumper.cpp601 if (!Sec) in printVersionSymbolSection()
638 if (!Sec) in printVersionDefinitionSection()
697 if (!Sec) in printVersionDependencySection()
2452 while (!Sec.empty()) { in printMipsOptions()
2467 Sec = Sec.slice(O->size); in printMipsOptions()
3263 (Sec.sh_type == ELF::SHT_NOBITS) && ((Sec.sh_flags & ELF::SHF_TLS) != 0); in checkoffsets()
3281 (Sec.sh_type == ELF::SHT_NOBITS) && ((Sec.sh_flags & ELF::SHF_TLS) != 0); in checkVMA()
3301 (Sec.sh_addr > Phdr.p_vaddr && Sec.sh_addr < Phdr.p_memsz)); in checkPTDynamic()
3365 checkoffsets(Phdr, Sec) && checkVMA(Phdr, Sec) && in printProgramHeaders()
3366 checkPTDynamic(Phdr, Sec) && (Sec.sh_type != ELF::SHT_NULL)) in printProgramHeaders()
[all …]

12345