Lines Matching refs:Sec
365 void XCOFFObjectFile::moveSectionNext(DataRefImpl &Sec) const { in moveSectionNext()
366 const char *Ptr = reinterpret_cast<const char *>(Sec.p); in moveSectionNext()
367 Sec.p = reinterpret_cast<uintptr_t>(Ptr + getSectionHeaderSize()); in moveSectionNext()
370 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const { in getSectionName()
371 return generateXCOFFFixedNameStringRef(getSectionNameInternal(Sec)); in getSectionName()
374 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const { in getSectionAddress()
378 return toSection64(Sec)->VirtualAddress; in getSectionAddress()
380 return toSection32(Sec)->VirtualAddress; in getSectionAddress()
383 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const { in getSectionIndex()
387 return toSection64(Sec) - sectionHeaderTable64() + 1; in getSectionIndex()
389 return toSection32(Sec) - sectionHeaderTable32() + 1; in getSectionIndex()
392 uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const { in getSectionSize()
396 return toSection64(Sec)->SectionSize; in getSectionSize()
398 return toSection32(Sec)->SectionSize; in getSectionSize()
402 XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const { in getSectionContents()
403 if (isSectionVirtual(Sec)) in getSectionContents()
408 OffsetToRaw = toSection64(Sec)->FileOffsetToRawData; in getSectionContents()
410 OffsetToRaw = toSection32(Sec)->FileOffsetToRawData; in getSectionContents()
413 uint64_t SectionSize = getSectionSize(Sec); in getSectionContents()
424 uint64_t XCOFFObjectFile::getSectionAlignment(DataRefImpl Sec) const { in getSectionAlignment()
430 uint64_t XCOFFObjectFile::getSectionFileOffsetToRawData(DataRefImpl Sec) const { in getSectionFileOffsetToRawData()
432 return toSection64(Sec)->FileOffsetToRawData; in getSectionFileOffsetToRawData()
434 return toSection32(Sec)->FileOffsetToRawData; in getSectionFileOffsetToRawData()
484 bool XCOFFObjectFile::isSectionCompressed(DataRefImpl Sec) const { in isSectionCompressed()
488 bool XCOFFObjectFile::isSectionText(DataRefImpl Sec) const { in isSectionText()
489 return getSectionFlags(Sec) & XCOFF::STYP_TEXT; in isSectionText()
492 bool XCOFFObjectFile::isSectionData(DataRefImpl Sec) const { in isSectionData()
493 uint32_t Flags = getSectionFlags(Sec); in isSectionData()
497 bool XCOFFObjectFile::isSectionBSS(DataRefImpl Sec) const { in isSectionBSS()
498 uint32_t Flags = getSectionFlags(Sec); in isSectionBSS()
502 bool XCOFFObjectFile::isDebugSection(DataRefImpl Sec) const { in isDebugSection()
503 uint32_t Flags = getSectionFlags(Sec); in isDebugSection()
507 bool XCOFFObjectFile::isSectionVirtual(DataRefImpl Sec) const { in isSectionVirtual()
508 return is64Bit() ? toSection64(Sec)->FileOffsetToRawData == 0 in isSectionVirtual()
509 : toSection32(Sec)->FileOffsetToRawData == 0; in isSectionVirtual()
512 relocation_iterator XCOFFObjectFile::section_rel_begin(DataRefImpl Sec) const { in section_rel_begin()
515 const XCOFFSectionHeader64 *SectionEntPtr = toSection64(Sec); in section_rel_begin()
525 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_begin()
538 relocation_iterator XCOFFObjectFile::section_rel_end(DataRefImpl Sec) const { in section_rel_end()
541 const XCOFFSectionHeader64 *SectionEntPtr = toSection64(Sec); in section_rel_end()
551 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_end()
801 for (const auto &Sec : Sections) in getSectionByType() local
802 if (Sec.getSectionType() == SectType) in getSectionByType()
803 return reinterpret_cast<uintptr_t>(&Sec); in getSectionByType()
955 const char *XCOFFObjectFile::getSectionNameInternal(DataRefImpl Sec) const { in getSectionNameInternal()
956 return is64Bit() ? toSection64(Sec)->Name : toSection32(Sec)->Name; in getSectionNameInternal()
963 int32_t XCOFFObjectFile::getSectionFlags(DataRefImpl Sec) const { in getSectionFlags()
964 return is64Bit() ? toSection64(Sec)->Flags : toSection32(Sec)->Flags; in getSectionFlags()
992 const XCOFFSectionHeader<T> &Sec) const { in getNumberOfRelocationEntries()
993 const T &Section = static_cast<const T &>(Sec); in getNumberOfRelocationEntries()
1000 for (const auto &Sec : sections32()) { in getNumberOfRelocationEntries() local
1001 if (Sec.Flags == XCOFF::STYP_OVRFLO && in getNumberOfRelocationEntries()
1002 Sec.NumberOfRelocations == SectionIndex) in getNumberOfRelocationEntries()
1003 return Sec.PhysicalAddress; in getNumberOfRelocationEntries()
1009 Expected<ArrayRef<Reloc>> XCOFFObjectFile::relocations(const Shdr &Sec) const { in relocations()
1011 Sec.FileOffsetToRelocationInfo); in relocations()
1012 auto NumRelocEntriesOrErr = getNumberOfRelocationEntries(Sec); in relocations()
1026 Twine::utohexstr(Sec.FileOffsetToRelocationInfo) + " and size 0x" + in relocations()