Home
last modified time | relevance | path

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

123

/external/llvm/include/llvm/Object/
DELFObjectFile.h54 virtual uint32_t getSectionType(DataRefImpl Sec) const = 0;
55 virtual uint64_t getSectionFlags(DataRefImpl Sec) const = 0;
213 void moveSectionNext(DataRefImpl &Sec) const override;
214 std::error_code getSectionName(DataRefImpl Sec,
216 uint64_t getSectionAddress(DataRefImpl Sec) const override;
217 uint64_t getSectionSize(DataRefImpl Sec) const override;
218 std::error_code getSectionContents(DataRefImpl Sec,
220 uint64_t getSectionAlignment(DataRefImpl Sec) const override;
221 bool isSectionText(DataRefImpl Sec) const override;
222 bool isSectionData(DataRefImpl Sec) const override;
[all …]
DELF.h125 const Elf_Sym *symbol_begin(const Elf_Shdr *Sec) const { in symbol_begin() argument
126 if (!Sec) in symbol_begin()
128 if (Sec->sh_entsize != sizeof(Elf_Sym)) in symbol_begin()
130 return reinterpret_cast<const Elf_Sym *>(base() + Sec->sh_offset); in symbol_begin()
132 const Elf_Sym *symbol_end(const Elf_Shdr *Sec) const { in symbol_end() argument
133 if (!Sec) in symbol_end()
135 uint64_t Size = Sec->sh_size; in symbol_end()
138 return symbol_begin(Sec) + Size / sizeof(Elf_Sym); in symbol_end()
140 Elf_Sym_Range symbols(const Elf_Shdr *Sec) const { in symbols() argument
141 return make_range(symbol_begin(Sec), symbol_end(Sec)); in symbols()
[all …]
DMachO.h206 unsigned getSectionType(SectionRef Sec) const;
215 unsigned getSectionID(SectionRef Sec) const;
217 void moveSectionNext(DataRefImpl &Sec) const override;
218 std::error_code getSectionName(DataRefImpl Sec,
220 uint64_t getSectionAddress(DataRefImpl Sec) const override;
221 uint64_t getSectionSize(DataRefImpl Sec) const override;
222 std::error_code getSectionContents(DataRefImpl Sec,
224 uint64_t getSectionAlignment(DataRefImpl Sec) const override;
225 bool isSectionText(DataRefImpl Sec) const override;
226 bool isSectionData(DataRefImpl Sec) const override;
[all …]
DObjectFile.h209 virtual void moveSectionNext(DataRefImpl &Sec) const = 0;
210 virtual std::error_code getSectionName(DataRefImpl Sec,
212 virtual uint64_t getSectionAddress(DataRefImpl Sec) const = 0;
213 virtual uint64_t getSectionSize(DataRefImpl Sec) const = 0;
214 virtual std::error_code getSectionContents(DataRefImpl Sec,
216 virtual uint64_t getSectionAlignment(DataRefImpl Sec) const = 0;
217 virtual bool isSectionText(DataRefImpl Sec) const = 0;
218 virtual bool isSectionData(DataRefImpl Sec) const = 0;
219 virtual bool isSectionBSS(DataRefImpl Sec) const = 0;
221 virtual bool isSectionVirtual(DataRefImpl Sec) const = 0;
[all …]
DCOFF.h577 const coff_section *toSec(DataRefImpl Sec) const;
657 void moveSectionNext(DataRefImpl &Sec) const override;
658 std::error_code getSectionName(DataRefImpl Sec,
660 uint64_t getSectionAddress(DataRefImpl Sec) const override;
661 uint64_t getSectionSize(DataRefImpl Sec) const override;
662 std::error_code getSectionContents(DataRefImpl Sec,
664 uint64_t getSectionAlignment(DataRefImpl Sec) const override;
665 bool isSectionText(DataRefImpl Sec) const override;
666 bool isSectionData(DataRefImpl Sec) const override;
667 bool isSectionBSS(DataRefImpl Sec) const override;
[all …]
/external/llvm/include/llvm/MC/
DMCAssembler.h148 explicit MCDummyFragment(MCSection *Sec)
149 : MCFragment(FT_Dummy, false, 0, Sec){};
159 MCSection *Sec)
160 : MCFragment(FType, HasInstructions, 0, Sec) {}
186 MCSection *Sec)
187 : MCEncodedFragment(FType, HasInstructions, Sec) {}
207 MCSection *Sec)
209 Sec) {}
234 MCDataFragment(MCSection *Sec = nullptr)
235 : MCEncodedFragmentWithFixups<32, 4>(FT_Data, false, Sec) {}
[all …]
DMCMachObjectWriter.h137 uint64_t getSectionAddress(const MCSection *Sec) const { in getSectionAddress() argument
138 return SectionAddress.lookup(Sec); in getSectionAddress()
175 void writeSection(const MCAsmLayout &Layout, const MCSection &Sec,
215 void addRelocation(const MCSymbol *RelSymbol, const MCSection *Sec, in addRelocation() argument
218 Relocations[Sec].push_back(P); in addRelocation()
DMCAsmLayout.h85 uint64_t getSectionAddressSize(const MCSection *Sec) const;
89 uint64_t getSectionFileSize(const MCSection *Sec) const;
/external/llvm/lib/Target/Mips/MCTargetDesc/
DMipsOptionRecord.cpp31 MCSectionELF *Sec = in EmitMipsOptionRecord() local
34 MCA.registerSection(*Sec); in EmitMipsOptionRecord()
35 Sec->setAlignment(8); in EmitMipsOptionRecord()
36 Streamer->SwitchSection(Sec); in EmitMipsOptionRecord()
50 MCSectionELF *Sec = Context.getELFSection(".reginfo", ELF::SHT_MIPS_REGINFO, in EmitMipsOptionRecord() local
52 MCA.registerSection(*Sec); in EmitMipsOptionRecord()
53 Sec->setAlignment(MTS->getABI().IsN32() ? 8 : 4); in EmitMipsOptionRecord()
54 Streamer->SwitchSection(Sec); in EmitMipsOptionRecord()
/external/llvm/lib/Object/
DCOFFObjectFile.cpp243 const coff_section *Sec = nullptr; in getSymbolSection() local
244 if (std::error_code EC = getSection(Symb.getSectionNumber(), Sec)) in getSymbolSection()
247 Ret.p = reinterpret_cast<uintptr_t>(Sec); in getSymbolSection()
257 const coff_section *Sec = toSec(Ref); in moveSectionNext() local
258 Sec += 1; in moveSectionNext()
259 Ref.p = reinterpret_cast<uintptr_t>(Sec); in moveSectionNext()
264 const coff_section *Sec = toSec(Ref); in getSectionName() local
265 return getSectionName(Sec, Result); in getSectionName()
269 const coff_section *Sec = toSec(Ref); in getSectionAddress() local
270 uint64_t Result = Sec->VirtualAddress; in getSectionAddress()
[all …]
DSymbolSize.cpp34 static unsigned getSectionID(const ObjectFile &O, SectionRef Sec) { in getSectionID() argument
36 return M->getSectionID(Sec); in getSectionID()
37 return cast<COFFObjectFile>(O).getSectionID(Sec); in getSectionID()
69 for (SectionRef Sec : O.sections()) { in computeSymbolSizes() local
70 uint64_t Address = Sec.getAddress(); in computeSymbolSizes()
71 uint64_t Size = Sec.getSize(); in computeSymbolSizes()
73 {O.symbol_end(), Address + Size, 0, getSectionID(O, Sec)}); in computeSymbolSizes()
DMachOObjectFile.cpp70 unsigned Sec) { in getSectionPtr() argument
79 uintptr_t SectionAddr = CommandAddr + SegmentLoadSize + Sec * SectionSize; in getSectionPtr()
155 DataRefImpl Sec) { in getSectionFlags() argument
157 MachO::section_64 Sect = O->getSection64(Sec); in getSectionFlags()
160 MachO::section Sect = O->getSection(Sec); in getSectionFlags()
220 const char *Sec = getSectionPtr(Obj, Load, J); in parseSegmentLoadCommand() local
221 Sections.push_back(Sec); in parseSegmentLoadCommand()
340 unsigned MachOObjectFile::getSectionType(SectionRef Sec) const { in getSectionType()
341 DataRefImpl DRI = Sec.getRawDataRefImpl(); in getSectionType()
404 section_iterator Sec = *getSymbolSection(Symb); in getSymbolType() local
[all …]
/external/llvm/lib/MC/
DWinCOFFObjectWriter.cpp157 void defineSection(MCSectionCOFF const &Sec);
267 void WinCOFFObjectWriter::defineSection(MCSectionCOFF const &Sec) { in defineSection() argument
268 COFFSection *coff_section = createSection(Sec.getSectionName()); in defineSection()
269 COFFSymbol *coff_symbol = createSymbol(Sec.getSectionName()); in defineSection()
270 if (Sec.getSelection() != COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE) { in defineSection()
271 if (const MCSymbol *S = Sec.getCOMDATSymbol()) { in defineSection()
287 coff_symbol->Aux[0].Aux.SectionDefinition.Selection = Sec.getSelection(); in defineSection()
289 coff_section->Header.Characteristics = Sec.getCharacteristics(); in defineSection()
292 switch (Sec.getAlignment()) { in defineSection()
340 coff_section->MCSection = &Sec; in defineSection()
[all …]
DMCAssembler.cpp71 for (MCSection &Sec : Asm) in MCAsmLayout()
72 if (!Sec.isVirtualSection()) in MCAsmLayout()
73 SectionOrder.push_back(&Sec); in MCAsmLayout()
74 for (MCSection &Sec : Asm) in MCAsmLayout()
75 if (Sec.isVirtualSection()) in MCAsmLayout()
76 SectionOrder.push_back(&Sec); in MCAsmLayout()
80 const MCSection *Sec = F->getParent(); in isFragmentValid() local
81 const MCFragment *LastValid = LastValidFragment.lookup(Sec); in isFragmentValid()
84 assert(LastValid->getParent() == Sec); in isFragmentValid()
99 MCSection *Sec = F->getParent(); in ensureValid() local
[all …]
DMachObjectWriter.cpp106 uint64_t MachObjectWriter::getPaddingSize(const MCSection *Sec, in getPaddingSize() argument
108 uint64_t EndAddr = getSectionAddress(Sec) + Layout.getSectionAddressSize(Sec); in getPaddingSize()
109 unsigned Next = Sec->getLayoutOrder() + 1; in getPaddingSize()
197 const MCSection &Sec, uint64_t VMAddr, in writeSection() argument
201 uint64_t SectionSize = Layout.getSectionAddressSize(&Sec); in writeSection()
202 const MCSectionMachO &Section = cast<MCSectionMachO>(Sec); in writeSection()
206 assert(Layout.getSectionFileSize(&Sec) == 0 && "Invalid file size!"); in writeSection()
232 write32(IndirectSymBase.lookup(&Sec)); // reserved1 in writeSection()
608 for (const MCSection *Sec : Layout.getSectionOrder()) { in computeSectionAddresses() local
609 StartAddress = RoundUpToAlignment(StartAddress, Sec->getAlignment()); in computeSectionAddresses()
[all …]
DELFObjectWriter.cpp125 unsigned addToSectionTable(const MCSectionELF *Sec);
201 const MCSectionELF &Sec);
212 void writeSectionData(const MCAssembler &Asm, MCSection &Sec,
220 void writeRelocations(const MCAssembler &Asm, const MCSectionELF &Sec);
242 unsigned ELFObjectWriter::addToSectionTable(const MCSectionELF *Sec) { in addToSectionTable() argument
243 SectionTable.push_back(Sec); in addToSectionTable()
244 StrTabBuilder.add(Sec->getSectionName()); in addToSectionTable()
562 auto &Sec = cast<MCSectionELF>(Sym->getSection()); in shouldRelocateWithSymbol() local
563 unsigned Flags = Sec.getFlags(); in shouldRelocateWithSymbol()
947 const MCSectionELF &Sec) { in createRelocationSection() argument
[all …]
DMCELFStreamer.cpp501 MCSection &Sec = *getCurrentSectionOnly(); in EmitInstToData() local
511 else if (isBundleLocked() && !Sec.isBundleGroupBeforeFirstInst()) in EmitInstToData()
527 if (Sec.getBundleLockState() == MCSection::BundleLockedAlignToEnd) { in EmitInstToData()
537 Sec.setBundleGroupBeforeFirstInst(false); in EmitInstToData()
569 MCSection &Sec = *getCurrentSectionOnly(); in EmitBundleLock() local
577 Sec.setBundleGroupBeforeFirstInst(true); in EmitBundleLock()
585 Sec.setBundleLockState(AlignToEnd ? MCSection::BundleLockedAlignToEnd in EmitBundleLock()
590 MCSection &Sec = *getCurrentSectionOnly(); in EmitBundleUnlock() local
597 else if (Sec.isBundleGroupBeforeFirstInst()) in EmitBundleUnlock()
608 Sec.setBundleLockState(MCSection::NotBundleLocked); in EmitBundleUnlock()
[all …]
DMCObjectStreamer.cpp224 bool MCObjectStreamer::mayHaveInstructions(MCSection &Sec) const { in mayHaveInstructions()
225 return Sec.hasInstructions(); in mayHaveInstructions()
232 MCSection *Sec = getCurrentSectionOnly(); in EmitInstruction() local
233 Sec->setHasInstructions(true); in EmitInstruction()
252 (Assembler.isBundlingEnabled() && Sec->isBundleLocked())) { in EmitInstruction()
440 const MCSection *Sec = getCurrentSection().first; in EmitFill() local
441 assert(Sec && "need a section"); in EmitFill()
442 unsigned ItemSize = Sec->isVirtualSection() ? 0 : 1; in EmitFill()
/external/llvm/tools/llvm-size/
Dllvm-size.cpp141 MachO::section_64 Sec = MachO->getSection64(Load, J); in PrintDarwinSectionSizes() local
143 outs() << "\tSection (" << format("%.16s", &Sec.segname) << ", " in PrintDarwinSectionSizes()
144 << format("%.16s", &Sec.sectname) << "): "; in PrintDarwinSectionSizes()
146 outs() << "\tSection " << format("%.16s", &Sec.sectname) << ": "; in PrintDarwinSectionSizes()
147 outs() << format(fmt.str().c_str(), Sec.size); in PrintDarwinSectionSizes()
149 outs() << " (addr 0x" << format("%" PRIx64, Sec.addr) << " offset " in PrintDarwinSectionSizes()
150 << Sec.offset << ")"; in PrintDarwinSectionSizes()
152 sec_total += Sec.size; in PrintDarwinSectionSizes()
167 MachO::section Sec = MachO->getSection(Load, J); in PrintDarwinSectionSizes() local
169 outs() << "\tSection (" << format("%.16s", &Sec.segname) << ", " in PrintDarwinSectionSizes()
[all …]
/external/llvm/tools/llvm-readobj/
DELFDumper.cpp107 void printRelocations(const Elf_Shdr *Sec);
312 const typename ELFO::Elf_Shdr *Sec, in printVersionSymbolSection() argument
315 if (!Sec) in printVersionSymbolSection()
317 StringRef Name = errorOrDefault(Obj->getSectionName(Sec)); in printVersionSymbolSection()
318 W.printNumber("Section Name", Name, Sec->sh_name); in printVersionSymbolSection()
319 W.printHex("Address", Sec->sh_addr); in printVersionSymbolSection()
320 W.printHex("Offset", Sec->sh_offset); in printVersionSymbolSection()
321 W.printNumber("Link", Sec->sh_link); in printVersionSymbolSection()
324 const uint8_t *P = (const uint8_t *)Obj->base() + Sec->sh_offset; in printVersionSymbolSection()
344 const typename ELFO::Elf_Shdr *Sec, in printVersionDefinitionSection() argument
[all …]
DARMEHABIPrinter.h374 for (const Elf_Shdr &Sec : ELF->sections()) { in FindExceptionTable() local
375 if (Sec.sh_type != ELF::SHT_REL || Sec.sh_info != IndexSectionIndex) in FindExceptionTable()
378 ErrorOr<const Elf_Shdr *> SymTabOrErr = ELF->getSection(Sec.sh_link); in FindExceptionTable()
382 for (const Elf_Rel &R : ELF->rels(&Sec)) { in FindExceptionTable()
543 for (const Elf_Shdr &Sec : ELF->sections()) { in PrintUnwindInformation() local
544 if (Sec.sh_type == ELF::SHT_ARM_EXIDX) { in PrintUnwindInformation()
548 if (ErrorOr<StringRef> SectionName = ELF->getSectionName(&Sec)) in PrintUnwindInformation()
550 SW.printHex("SectionOffset", Sec.sh_offset); in PrintUnwindInformation()
552 PrintIndexTable(SectionIndex, &Sec); in PrintUnwindInformation()
/external/llvm/tools/dsymutil/
DMachOUtils.cpp276 MCSection *Sec = Layout.getSectionOrder()[i]; in createDwarfSegment() local
277 if (Sec->begin() == Sec->end() || !Layout.getSectionFileSize(Sec)) in createDwarfSegment()
280 unsigned Align = Sec->getAlignment(); in createDwarfSegment()
285 Writer.writeSection(Layout, *Sec, VMAddr, FileOffset, 0, 0, 0); in createDwarfSegment()
287 FileOffset += Layout.getSectionAddressSize(Sec); in createDwarfSegment()
288 VMAddr += Layout.getSectionAddressSize(Sec); in createDwarfSegment()
392 MCSection *Sec = Layout.getSectionOrder()[i]; in generateDsymCompanion() local
393 if (Sec->begin() == Sec->end()) in generateDsymCompanion()
396 if (uint64_t Size = Layout.getSectionFileSize(Sec)) { in generateDsymCompanion()
398 RoundUpToAlignment(DwarfSegmentSize, Sec->getAlignment()); in generateDsymCompanion()
[all …]
/external/llvm/tools/llvm-cxxdump/
Dllvm-cxxdump.cpp70 const SectionRef &Sec, uint64_t SecAddress, in collectRelocatedSymbols() argument
75 for (const SectionRef &SR : SectionRelocMap[Sec]) { in collectRelocatedSymbols()
94 const ObjectFile *Obj, const SectionRef &Sec, uint64_t SecAddress, in collectRelocationOffsets() argument
99 for (const SectionRef &SR : SectionRelocMap[Sec]) { in collectRelocationOffsets()
187 const SectionRef &Sec = *SecI; in dumpCXXData() local
189 if (Sec.isBSS() || Sec.isVirtual()) in dumpCXXData()
192 error(Sec.getContents(SecContents)); in dumpCXXData()
196 uint64_t SecAddress = Sec.getAddress(); in dumpCXXData()
197 uint64_t SecSize = Sec.getSize(); in dumpCXXData()
207 collectRelocationOffsets(Obj, Sec, SecAddress, SecAddress, SecSize, in dumpCXXData()
[all …]
/external/llvm/tools/yaml2obj/
Dyaml2elf.cpp194 for (const auto &Sec : Doc.Sections) in initSectionHeaders() local
195 DotShStrtab.add(Sec->Name); in initSectionHeaders()
198 for (const auto &Sec : Doc.Sections) { in initSectionHeaders() local
200 SHeader.sh_name = DotShStrtab.getOffset(Sec->Name); in initSectionHeaders()
201 SHeader.sh_type = Sec->Type; in initSectionHeaders()
202 SHeader.sh_flags = Sec->Flags; in initSectionHeaders()
203 SHeader.sh_addr = Sec->Address; in initSectionHeaders()
204 SHeader.sh_addralign = Sec->AddressAlign; in initSectionHeaders()
206 if (!Sec->Link.empty()) { in initSectionHeaders()
208 if (SN2I.lookup(Sec->Link, Index)) { in initSectionHeaders()
[all …]
/external/llvm/tools/obj2yaml/
Delf2yaml.cpp75 for (const Elf_Shdr &Sec : Obj.sections()) { in dump() local
76 switch (Sec.sh_type) { in dump()
83 Symtab = &Sec; in dump()
86 ErrorOr<ArrayRef<Elf_Word>> TableOrErr = Obj.getSHNDXTable(Sec); in dump()
93 ErrorOr<ELFYAML::RelocationSection *> S = dumpRelaSection(&Sec); in dump()
100 ErrorOr<ELFYAML::RelocationSection *> S = dumpRelSection(&Sec); in dump()
107 ErrorOr<ELFYAML::Group *> G = dumpGroup(&Sec); in dump()
114 ErrorOr<ELFYAML::MipsABIFlags *> G = dumpMipsABIFlags(&Sec); in dump()
121 ErrorOr<ELFYAML::NoBitsSection *> S = dumpNoBitsSection(&Sec); in dump()
128 ErrorOr<ELFYAML::RawContentSection *> S = dumpContentSection(&Sec); in dump()

123