Lines Matching refs:Sec
371 void XCOFFObjectFile::moveSectionNext(DataRefImpl &Sec) const { in moveSectionNext()
372 const char *Ptr = reinterpret_cast<const char *>(Sec.p); in moveSectionNext()
373 Sec.p = reinterpret_cast<uintptr_t>(Ptr + getSectionHeaderSize()); in moveSectionNext()
376 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const { in getSectionName()
377 return generateXCOFFFixedNameStringRef(getSectionNameInternal(Sec)); in getSectionName()
380 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const { in getSectionAddress()
384 return toSection64(Sec)->VirtualAddress; in getSectionAddress()
386 return toSection32(Sec)->VirtualAddress; in getSectionAddress()
389 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const { in getSectionIndex()
393 return toSection64(Sec) - sectionHeaderTable64() + 1; in getSectionIndex()
395 return toSection32(Sec) - sectionHeaderTable32() + 1; in getSectionIndex()
398 uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const { in getSectionSize()
402 return toSection64(Sec)->SectionSize; in getSectionSize()
404 return toSection32(Sec)->SectionSize; in getSectionSize()
408 XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const { in getSectionContents()
409 if (isSectionVirtual(Sec)) in getSectionContents()
414 OffsetToRaw = toSection64(Sec)->FileOffsetToRawData; in getSectionContents()
416 OffsetToRaw = toSection32(Sec)->FileOffsetToRawData; in getSectionContents()
419 uint64_t SectionSize = getSectionSize(Sec); in getSectionContents()
430 uint64_t XCOFFObjectFile::getSectionAlignment(DataRefImpl Sec) const { in getSectionAlignment()
436 uint64_t XCOFFObjectFile::getSectionFileOffsetToRawData(DataRefImpl Sec) const { in getSectionFileOffsetToRawData()
438 return toSection64(Sec)->FileOffsetToRawData; in getSectionFileOffsetToRawData()
440 return toSection32(Sec)->FileOffsetToRawData; in getSectionFileOffsetToRawData()
490 bool XCOFFObjectFile::isSectionCompressed(DataRefImpl Sec) const { in isSectionCompressed()
494 bool XCOFFObjectFile::isSectionText(DataRefImpl Sec) const { in isSectionText()
495 return getSectionFlags(Sec) & XCOFF::STYP_TEXT; in isSectionText()
498 bool XCOFFObjectFile::isSectionData(DataRefImpl Sec) const { in isSectionData()
499 uint32_t Flags = getSectionFlags(Sec); in isSectionData()
503 bool XCOFFObjectFile::isSectionBSS(DataRefImpl Sec) const { in isSectionBSS()
504 uint32_t Flags = getSectionFlags(Sec); in isSectionBSS()
508 bool XCOFFObjectFile::isDebugSection(DataRefImpl Sec) const { in isDebugSection()
509 uint32_t Flags = getSectionFlags(Sec); in isDebugSection()
513 bool XCOFFObjectFile::isSectionVirtual(DataRefImpl Sec) const { in isSectionVirtual()
514 return is64Bit() ? toSection64(Sec)->FileOffsetToRawData == 0 in isSectionVirtual()
515 : toSection32(Sec)->FileOffsetToRawData == 0; in isSectionVirtual()
518 relocation_iterator XCOFFObjectFile::section_rel_begin(DataRefImpl Sec) const { in section_rel_begin()
521 const XCOFFSectionHeader64 *SectionEntPtr = toSection64(Sec); in section_rel_begin()
531 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_begin()
544 relocation_iterator XCOFFObjectFile::section_rel_end(DataRefImpl Sec) const { in section_rel_end()
547 const XCOFFSectionHeader64 *SectionEntPtr = toSection64(Sec); in section_rel_end()
557 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_end()
809 for (const auto &Sec : Sections) in getSectionByType() local
810 if (Sec.getSectionType() == SectType) in getSectionByType()
811 return reinterpret_cast<uintptr_t>(&Sec); in getSectionByType()
963 const char *XCOFFObjectFile::getSectionNameInternal(DataRefImpl Sec) const { in getSectionNameInternal()
964 return is64Bit() ? toSection64(Sec)->Name : toSection32(Sec)->Name; in getSectionNameInternal()
971 int32_t XCOFFObjectFile::getSectionFlags(DataRefImpl Sec) const { in getSectionFlags()
972 return is64Bit() ? toSection64(Sec)->Flags : toSection32(Sec)->Flags; in getSectionFlags()
1000 const XCOFFSectionHeader<T> &Sec) const { in getNumberOfRelocationEntries()
1001 const T &Section = static_cast<const T &>(Sec); in getNumberOfRelocationEntries()
1008 for (const auto &Sec : sections32()) { in getNumberOfRelocationEntries() local
1009 if (Sec.Flags == XCOFF::STYP_OVRFLO && in getNumberOfRelocationEntries()
1010 Sec.NumberOfRelocations == SectionIndex) in getNumberOfRelocationEntries()
1011 return Sec.PhysicalAddress; in getNumberOfRelocationEntries()
1017 Expected<ArrayRef<Reloc>> XCOFFObjectFile::relocations(const Shdr &Sec) const { in relocations()
1019 Sec.FileOffsetToRelocationInfo); in relocations()
1020 auto NumRelocEntriesOrErr = getNumberOfRelocationEntries(Sec); in relocations()
1034 Twine::utohexstr(Sec.FileOffsetToRelocationInfo) + " and size 0x" + in relocations()