Lines Matching refs:Sec
330 void XCOFFObjectFile::moveSectionNext(DataRefImpl &Sec) const { in moveSectionNext()
331 const char *Ptr = reinterpret_cast<const char *>(Sec.p); in moveSectionNext()
332 Sec.p = reinterpret_cast<uintptr_t>(Ptr + getSectionHeaderSize()); in moveSectionNext()
335 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const { in getSectionName()
336 return generateXCOFFFixedNameStringRef(getSectionNameInternal(Sec)); in getSectionName()
339 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const { in getSectionAddress()
343 return toSection64(Sec)->VirtualAddress; in getSectionAddress()
345 return toSection32(Sec)->VirtualAddress; in getSectionAddress()
348 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const { in getSectionIndex()
352 return toSection64(Sec) - sectionHeaderTable64() + 1; in getSectionIndex()
354 return toSection32(Sec) - sectionHeaderTable32() + 1; in getSectionIndex()
357 uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const { in getSectionSize()
361 return toSection64(Sec)->SectionSize; in getSectionSize()
363 return toSection32(Sec)->SectionSize; in getSectionSize()
367 XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const { in getSectionContents()
368 if (isSectionVirtual(Sec)) in getSectionContents()
373 OffsetToRaw = toSection64(Sec)->FileOffsetToRawData; in getSectionContents()
375 OffsetToRaw = toSection32(Sec)->FileOffsetToRawData; in getSectionContents()
378 uint64_t SectionSize = getSectionSize(Sec); in getSectionContents()
389 uint64_t XCOFFObjectFile::getSectionAlignment(DataRefImpl Sec) const { in getSectionAlignment()
432 bool XCOFFObjectFile::isSectionCompressed(DataRefImpl Sec) const { in isSectionCompressed()
436 bool XCOFFObjectFile::isSectionText(DataRefImpl Sec) const { in isSectionText()
437 return getSectionFlags(Sec) & XCOFF::STYP_TEXT; in isSectionText()
440 bool XCOFFObjectFile::isSectionData(DataRefImpl Sec) const { in isSectionData()
441 uint32_t Flags = getSectionFlags(Sec); in isSectionData()
445 bool XCOFFObjectFile::isSectionBSS(DataRefImpl Sec) const { in isSectionBSS()
446 uint32_t Flags = getSectionFlags(Sec); in isSectionBSS()
450 bool XCOFFObjectFile::isDebugSection(DataRefImpl Sec) const { in isDebugSection()
451 uint32_t Flags = getSectionFlags(Sec); in isDebugSection()
455 bool XCOFFObjectFile::isSectionVirtual(DataRefImpl Sec) const { in isSectionVirtual()
456 return is64Bit() ? toSection64(Sec)->FileOffsetToRawData == 0 in isSectionVirtual()
457 : toSection32(Sec)->FileOffsetToRawData == 0; in isSectionVirtual()
460 relocation_iterator XCOFFObjectFile::section_rel_begin(DataRefImpl Sec) const { in section_rel_begin()
463 const XCOFFSectionHeader64 *SectionEntPtr = toSection64(Sec); in section_rel_begin()
473 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_begin()
486 relocation_iterator XCOFFObjectFile::section_rel_end(DataRefImpl Sec) const { in section_rel_end()
489 const XCOFFSectionHeader64 *SectionEntPtr = toSection64(Sec); in section_rel_end()
499 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_end()
883 const char *XCOFFObjectFile::getSectionNameInternal(DataRefImpl Sec) const { in getSectionNameInternal()
884 return is64Bit() ? toSection64(Sec)->Name : toSection32(Sec)->Name; in getSectionNameInternal()
891 int32_t XCOFFObjectFile::getSectionFlags(DataRefImpl Sec) const { in getSectionFlags()
892 return is64Bit() ? toSection64(Sec)->Flags : toSection32(Sec)->Flags; in getSectionFlags()
920 const XCOFFSectionHeader<T> &Sec) const { in getNumberOfRelocationEntries()
921 const T &Section = static_cast<const T &>(Sec); in getNumberOfRelocationEntries()
928 for (const auto &Sec : sections32()) { in getNumberOfRelocationEntries() local
929 if (Sec.Flags == XCOFF::STYP_OVRFLO && in getNumberOfRelocationEntries()
930 Sec.NumberOfRelocations == SectionIndex) in getNumberOfRelocationEntries()
931 return Sec.PhysicalAddress; in getNumberOfRelocationEntries()
937 Expected<ArrayRef<Reloc>> XCOFFObjectFile::relocations(const Shdr &Sec) const { in relocations()
939 Sec.FileOffsetToRelocationInfo); in relocations()
940 auto NumRelocEntriesOrErr = getNumberOfRelocationEntries(Sec); in relocations()
954 Twine::utohexstr(Sec.FileOffsetToRelocationInfo) + " and size 0x" + in relocations()