Searched refs:Sec (Results 1 - 25 of 108) sorted by relevance

12345

/freebsd-11-stable/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/
H A DObject.cpp69 template <class ELFT> void ELFWriter<ELFT>::writeShdr(const SectionBase &Sec) { argument
70 uint8_t *B = Buf.getBufferStart() + Sec.HeaderOffset;
72 Shdr.sh_name = Sec.NameIndex;
73 Shdr.sh_type = Sec.Type;
74 Shdr.sh_flags = Sec.Flags;
75 Shdr.sh_addr = Sec.Addr;
76 Shdr.sh_offset = Sec.Offset;
77 Shdr.sh_size = Sec.Size;
78 Shdr.sh_link = Sec.Link;
79 Shdr.sh_info = Sec
84 visit(Section &Sec) argument
87 visit(OwnedDataSection &Sec) argument
90 visit(StringTableSection &Sec) argument
93 visit(DynamicRelocationSection &Sec) argument
96 visit(SymbolTableSection &Sec) argument
104 visit(RelocationSection &Sec) argument
112 visit(GnuDebugLinkSection &Sec) argument
114 visit(GroupSection &Sec) argument
117 visit(SectionIndexSection &Sec) argument
120 visit(CompressedSection &Sec) argument
123 visit(DecompressedSection &Sec) argument
125 visit(const SectionIndexSection &Sec) argument
129 visit(const SymbolTableSection &Sec) argument
133 visit(const RelocationSection &Sec) argument
137 visit(const GnuDebugLinkSection &Sec) argument
141 visit(const GroupSection &Sec) argument
145 visit(const Section &Sec) argument
300 sectionPhysicalAddr(const SectionBase *Sec) argument
308 writeSection(const SectionBase *Sec, ArrayRef<uint8_t> Data) argument
357 visit(const Section &Sec) argument
361 visit(const OwnedDataSection &Sec) argument
365 visit(const StringTableSection &Sec) argument
374 visit(const DynamicRelocationSection &Sec) argument
385 visit(const StringTableSection &Sec) argument
396 visit(const OwnedDataSection &Sec) argument
424 visit(const DecompressedSection &Sec) argument
442 visit(const DecompressedSection &Sec) argument
471 visit(const CompressedSection &Sec) argument
476 visit(const CompressedSection &Sec) argument
503 CompressedSection(const SectionBase &Sec, DebugCompressionType CompressionType) argument
556 visit(const StringTableSection &Sec) argument
569 visit(const SectionIndexSection &Sec) argument
781 visit(const SymbolTableSection &Sec) argument
879 visit(const RelocationSection &Sec) argument
919 visit(const DynamicRelocationSection &Sec) argument
1027 visit(const GnuDebugLinkSection &Sec) argument
1044 visit(const GroupSection &Sec) argument
1061 sectionWithinSegment(const SectionBase &Sec, const Segment &Seg) argument
1522 auto &Sec = makeSection(Shdr); local
2334 checkSection(const SectionBase &Sec) argument
[all...]
H A DELFObjcopy.cpp54 using SectionPred = std::function<bool(const SectionBase &Sec)>;
56 static bool isDebugSection(const SectionBase &Sec) { argument
57 return StringRef(Sec.Name).startswith(".debug") ||
58 StringRef(Sec.Name).startswith(".zdebug") || Sec.Name == ".gdb_index";
61 static bool isDWOSection(const SectionBase &Sec) { argument
62 return StringRef(Sec.Name).endswith(".dwo");
65 static bool onlyKeepDWOPred(const Object &Obj, const SectionBase &Sec) { argument
67 if (&Sec == Obj.SectionNames)
71 return !isDWOSection(Sec);
100 setSectionFlagsAndType(SectionBase &Sec, SectionFlag Flags) argument
308 isCompressable(const SectionBase &Sec) argument
733 SectionBase *Sec = Obj.findSection(SI.SectionName); local
[all...]
H A DObject.h76 virtual void visit(const Section &Sec) = 0;
77 virtual void visit(const OwnedDataSection &Sec) = 0;
78 virtual void visit(const StringTableSection &Sec) = 0;
79 virtual void visit(const SymbolTableSection &Sec) = 0;
80 virtual void visit(const RelocationSection &Sec) = 0;
81 virtual void visit(const DynamicRelocationSection &Sec) = 0;
82 virtual void visit(const GnuDebugLinkSection &Sec) = 0;
83 virtual void visit(const GroupSection &Sec) = 0;
84 virtual void visit(const SectionIndexSection &Sec) = 0;
85 virtual void visit(const CompressedSection &Sec)
467 removeSection(const SectionBase *Sec) argument
468 addSection(const SectionBase *Sec) argument
548 DecompressedSection(const CompressedSection &Sec) argument
730 setSection(SectionBase *Sec) argument
797 addMember(SectionBase *Sec) argument
999 sectionIsAlloc(const SectionBase &Sec) argument
1062 auto Sec = std::make_unique<T>(std::forward<Ts>(Args)...); local
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Target/Mips/MCTargetDesc/
H A DMipsOptionRecord.cpp36 MCSectionELF *Sec = local
39 MCA.registerSection(*Sec);
40 Sec->setAlignment(Align(8));
41 Streamer->SwitchSection(Sec);
55 MCSectionELF *Sec = Context.getELFSection(".reginfo", ELF::SHT_MIPS_REGINFO, local
57 MCA.registerSection(*Sec);
58 Sec->setAlignment(MTS->getABI().IsN32() ? Align(8) : Align(4));
59 Streamer->SwitchSection(Sec);
/freebsd-11-stable/contrib/llvm-project/llvm/tools/llvm-objcopy/COFF/
H A DCOFFObjcopy.cpp31 static bool isDebugSection(const Section &Sec) { argument
32 return Sec.Name.startswith(".debug");
65 Section Sec; local
66 Sec.setOwnedContents(Contents);
67 Sec.Name = Name;
68 Sec.Header.VirtualSize = NeedVA ? Sec.getContents().size() : 0u;
69 Sec.Header.VirtualAddress = NeedVA ? getNextRVA(Obj) : 0u;
70 Sec.Header.SizeOfRawData =
71 NeedVA ? alignTo(Sec
[all...]
H A DObject.cpp51 for (const Section &Sec : Sections) {
52 for (const Relocation &R : Sec.Relocs) {
89 auto RemoveAssociated = [&AssociatedSections](const Section &Sec) {
90 return AssociatedSections.count(Sec.UniqueId) == 1;
96 [ToRemove, &RemovedSections](const Section &Sec) {
97 bool Remove = ToRemove(Sec);
99 RemovedSections.insert(Sec.UniqueId);
126 for (Section &Sec : Sections) {
127 if (ToTruncate(Sec)) {
128 Sec
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/tools/llvm-dwp/
H A DDWPStringPool.h34 MCSection *Sec; member in class:llvm::DWPStringPool
39 DWPStringPool(MCStreamer &Out, MCSection *Sec) : Out(Out), Sec(Sec) {} argument
46 Out.SwitchSection(Sec);
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/MC/
H A DMCFragment.h105 explicit MCDummyFragment(MCSection *Sec) : MCFragment(FT_Dummy, false, Sec) {} argument
121 MCSection *Sec)
122 : MCFragment(FType, HasInstructions, Sec) {}
180 MCSection *Sec)
181 : MCEncodedFragment(FType, HasInstructions, Sec) {}
201 MCSection *Sec)
203 Sec) {}
231 MCDataFragment(MCSection *Sec = nullptr)
232 : MCEncodedFragmentWithFixups<32, 4>(FT_Data, false, Sec) {}
120 MCEncodedFragment(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec) argument
178 MCEncodedFragmentWithContents(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec) argument
199 MCEncodedFragmentWithFixups(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec) argument
[all...]
H A DMCAsmLayout.h84 uint64_t getSectionAddressSize(const MCSection *Sec) const;
88 uint64_t getSectionFileSize(const MCSection *Sec) const;
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Object/
H A DSymbolSize.cpp27 static unsigned getSectionID(const ObjectFile &O, SectionRef Sec) { argument
29 return M->getSectionID(Sec);
30 return cast<COFFObjectFile>(O).getSectionID(Sec);
62 for (SectionRef Sec : O.sections()) {
63 uint64_t Address = Sec.getAddress();
64 uint64_t Size = Sec.getSize();
66 {O.symbol_end(), Address + Size, 0, getSectionID(O, Sec)});
H A DXCOFFObjectFile.cpp230 void XCOFFObjectFile::moveSectionNext(DataRefImpl &Sec) const {
231 const char *Ptr = reinterpret_cast<const char *>(Sec.p);
232 Sec.p = reinterpret_cast<uintptr_t>(Ptr + getSectionHeaderSize());
235 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const {
236 return generateXCOFFFixedNameStringRef(getSectionNameInternal(Sec));
239 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const {
243 return toSection64(Sec)->VirtualAddress;
245 return toSection32(Sec)->VirtualAddress;
248 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const {
252 return toSection64(Sec)
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/tools/llvm-objcopy/MachO/
H A DMachOReader.cpp31 Section constructSectionCommon(SectionType Sec) { argument
32 StringRef SegName(Sec.segname, strnlen(Sec.segname, sizeof(Sec.segname)));
33 StringRef SectName(Sec.sectname, strnlen(Sec.sectname, sizeof(Sec.sectname)));
35 S.Addr = Sec.addr;
36 S.Size = Sec.size;
37 S.Offset = Sec
50 constructSection(MachO::section Sec) argument
54 constructSection(MachO::section_64 Sec) argument
72 SectionType Sec; local
[all...]
H A DMachOObjcopy.cpp21 using SectionPred = std::function<bool(const Section &Sec)>;
27 RemovePred = [&Config, RemovePred](const Section &Sec) {
28 return Config.ToRemove.matches(Sec.CanonicalName);
34 RemovePred = [RemovePred](const Section &Sec) {
35 if (Sec.Segname == "__DWARF")
38 return RemovePred(Sec);
44 RemovePred = [&Config](const Section &Sec) {
45 return !Config.OnlySection.matches(Sec.CanonicalName);
90 for (Section &Sec : LC.Sections) {
91 if (Sec
[all...]
H A DMachOLayoutBuilder.cpp145 for (auto &Sec : LC.Sections) {
147 if (Sec.isVirtualSection()) {
148 Sec.Offset = 0;
151 offsetToAlignment(SegFileSize, Align(1ull << Sec.Align));
152 Sec.Offset = SegOffset + SegFileSize + PaddingSize;
153 Sec.Size = Sec.Content.size();
154 SegFileSize += PaddingSize + Sec.Size;
156 VMSize = std::max(VMSize, Sec.Addr + Sec
[all...]
H A DMachOWriter.cpp160 for (const auto &Sec : LC.Sections)
161 writeSectionInLoadCommand<MachO::section>(Sec, Begin);
170 for (const auto &Sec : LC.Sections)
171 writeSectionInLoadCommand<MachO::section_64>(Sec, Begin);
207 void MachOWriter::writeSectionInLoadCommand(const Section &Sec, uint8_t *&Out) { argument
209 assert(Sec.Segname.size() <= sizeof(Temp.segname) && "too long segment name");
210 assert(Sec.Sectname.size() <= sizeof(Temp.sectname) &&
213 memcpy(Temp.segname, Sec.Segname.data(), Sec.Segname.size());
214 memcpy(Temp.sectname, Sec
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/tools/llvm-readobj/
H A DXCOFFDumper.cpp46 template <typename T> void printGenericSectionHeader(T &Sec) const;
47 template <typename T> void printOverflowSectionHeader(T &Sec) const;
136 for (const auto &Sec : Sections) {
139 if (Sec.Flags != XCOFF::STYP_TEXT && Sec.Flags != XCOFF::STYP_DATA &&
140 Sec.Flags != XCOFF::STYP_TDATA && Sec.Flags != XCOFF::STYP_DWARF)
142 auto Relocations = unwrapOrError(Obj.getFileName(), Obj.relocations(Sec));
146 W.startLine() << "Section (index: " << Index << ") " << Sec.getName()
451 void XCOFFDumper::printOverflowSectionHeader(T &Sec) cons
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Object/
H A DELFObjectFile.h62 virtual uint32_t getSectionType(DataRefImpl Sec) const = 0;
63 virtual uint64_t getSectionFlags(DataRefImpl Sec) const = 0;
64 virtual uint64_t getSectionOffset(DataRefImpl Sec) const = 0;
242 SectionRef toSectionRef(const Elf_Shdr *Sec) const {
243 return SectionRef(toDRI(Sec), this);
273 void moveSectionNext(DataRefImpl &Sec) const override;
274 Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
275 uint64_t getSectionAddress(DataRefImpl Sec) const override;
276 uint64_t getSectionIndex(DataRefImpl Sec) const override;
277 uint64_t getSectionSize(DataRefImpl Sec) cons
[all...]
H A DXCOFFObjectFile.h224 const char *getSectionNameInternal(DataRefImpl Sec) const;
263 void moveSectionNext(DataRefImpl &Sec) const override;
264 Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
265 uint64_t getSectionAddress(DataRefImpl Sec) const override;
266 uint64_t getSectionIndex(DataRefImpl Sec) const override;
267 uint64_t getSectionSize(DataRefImpl Sec) const override;
269 getSectionContents(DataRefImpl Sec) const override;
270 uint64_t getSectionAlignment(DataRefImpl Sec) const override;
271 bool isSectionCompressed(DataRefImpl Sec) const override;
272 bool isSectionText(DataRefImpl Sec) cons
[all...]
H A DWasm.h173 void moveSectionNext(DataRefImpl &Sec) const override;
174 Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
175 uint64_t getSectionAddress(DataRefImpl Sec) const override;
176 uint64_t getSectionIndex(DataRefImpl Sec) const override;
177 uint64_t getSectionSize(DataRefImpl Sec) const override;
179 getSectionContents(DataRefImpl Sec) const override;
180 uint64_t getSectionAlignment(DataRefImpl Sec) const override;
181 bool isSectionCompressed(DataRefImpl Sec) const override;
182 bool isSectionText(DataRefImpl Sec) const override;
183 bool isSectionData(DataRefImpl Sec) cons
[all...]
H A DELF.h55 const typename ELFT::Shdr *Sec) {
58 return "[index " + std::to_string(Sec - &TableOrErr->front()) + "]";
170 Expected<Elf_Sym_Range> symbols(const Elf_Shdr *Sec) const {
171 if (!Sec)
173 return getSectionContentsAsArray<Elf_Sym>(Sec);
176 Expected<Elf_Rela_Range> relas(const Elf_Shdr *Sec) const {
177 return getSectionContentsAsArray<Elf_Rela>(Sec);
180 Expected<Elf_Rel_Range> rels(const Elf_Shdr *Sec) const {
181 return getSectionContentsAsArray<Elf_Rel>(Sec);
184 Expected<Elf_Relr_Range> relrs(const Elf_Shdr *Sec) cons
54 getSecIndexForError(const ELFFile<ELFT> *Obj, const typename ELFT::Shdr *Sec) argument
376 getSymbol(const Elf_Shdr *Sec, uint32_t Index) const argument
669 getStringTableForSymtab(const Elf_Shdr &Sec, Elf_Shdr_Range Sections) const argument
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/lib/MC/
H A DMCELFObjectTargetWriter.cpp31 MCSectionELF &Sec) {}
30 addTargetSectionFlags(MCContext &Ctx, MCSectionELF &Sec) argument
H A DMCFragment.cpp34 for (MCSection &Sec : Asm)
35 if (!Sec.isVirtualSection())
36 SectionOrder.push_back(&Sec);
37 for (MCSection &Sec : Asm)
38 if (Sec.isVirtualSection())
39 SectionOrder.push_back(&Sec);
43 const MCSection *Sec = F->getParent(); local
44 const MCFragment *LastValid = LastValidFragment.lookup(Sec);
47 assert(LastValid->getParent() == Sec);
62 MCSection *Sec local
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/tools/llvm-objdump/
H A DELFDump.cpp44 for (const typename ELFT::Shdr &Sec : *SectionsOrError) {
45 if (Sec.sh_type == ELF::SHT_DYNSYM)
46 return Elf->getStringTableForSymtab(Sec);
134 const object::ELFSectionRef &Sec) {
142 if ((Phdr.p_type == ELF::PT_LOAD) && (Phdr.p_vaddr <= Sec.getAddress()) &&
143 (Phdr.p_vaddr + Phdr.p_memsz > Sec.getAddress()))
144 return Sec.getAddress() - Phdr.p_vaddr + Phdr.p_paddr;
147 return Sec.getAddress();
150 uint64_t getELFSectionLMA(const object::ELFSectionRef &Sec) {
151 if (const auto *ELFObj = dyn_cast<ELF32LEObjectFile>(Sec
156 return getSectionLMA(ELFObj->getELFFile(), Sec); local
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/lib/DebugInfo/DWARF/
H A DDWARFDebugPubTable.cpp22 const DWARFSection &Sec,
25 DWARFDataExtractor PubNames(Obj, Sec, LittleEndian, 0);
36 while (Offset < Sec.Data.size()) {
21 DWARFDebugPubTable(const DWARFObject &Obj, const DWARFSection &Sec, bool LittleEndian, bool GnuStyle) argument
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/DebugInfo/DWARF/
H A DDWARFDebugPubTable.h70 DWARFDebugPubTable(const DWARFObject &Obj, const DWARFSection &Sec,

Completed in 136 milliseconds

12345