Lines Matching refs:Sec
237 void XCOFFObjectFile::moveSectionNext(DataRefImpl &Sec) const { in moveSectionNext()
238 const char *Ptr = reinterpret_cast<const char *>(Sec.p); in moveSectionNext()
239 Sec.p = reinterpret_cast<uintptr_t>(Ptr + getSectionHeaderSize()); in moveSectionNext()
242 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const { in getSectionName()
243 return generateXCOFFFixedNameStringRef(getSectionNameInternal(Sec)); in getSectionName()
246 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const { in getSectionAddress()
250 return toSection64(Sec)->VirtualAddress; in getSectionAddress()
252 return toSection32(Sec)->VirtualAddress; in getSectionAddress()
255 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const { in getSectionIndex()
259 return toSection64(Sec) - sectionHeaderTable64() + 1; in getSectionIndex()
261 return toSection32(Sec) - sectionHeaderTable32() + 1; in getSectionIndex()
264 uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const { in getSectionSize()
268 return toSection64(Sec)->SectionSize; in getSectionSize()
270 return toSection32(Sec)->SectionSize; in getSectionSize()
274 XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const { in getSectionContents()
275 if (isSectionVirtual(Sec)) in getSectionContents()
280 OffsetToRaw = toSection64(Sec)->FileOffsetToRawData; in getSectionContents()
282 OffsetToRaw = toSection32(Sec)->FileOffsetToRawData; in getSectionContents()
285 uint64_t SectionSize = getSectionSize(Sec); in getSectionContents()
292 uint64_t XCOFFObjectFile::getSectionAlignment(DataRefImpl Sec) const { in getSectionAlignment()
298 bool XCOFFObjectFile::isSectionCompressed(DataRefImpl Sec) const { in isSectionCompressed()
304 bool XCOFFObjectFile::isSectionText(DataRefImpl Sec) const { in isSectionText()
305 return getSectionFlags(Sec) & XCOFF::STYP_TEXT; in isSectionText()
308 bool XCOFFObjectFile::isSectionData(DataRefImpl Sec) const { in isSectionData()
309 uint32_t Flags = getSectionFlags(Sec); in isSectionData()
313 bool XCOFFObjectFile::isSectionBSS(DataRefImpl Sec) const { in isSectionBSS()
314 uint32_t Flags = getSectionFlags(Sec); in isSectionBSS()
318 bool XCOFFObjectFile::isSectionVirtual(DataRefImpl Sec) const { in isSectionVirtual()
319 return is64Bit() ? toSection64(Sec)->FileOffsetToRawData == 0 in isSectionVirtual()
320 : toSection32(Sec)->FileOffsetToRawData == 0; in isSectionVirtual()
323 relocation_iterator XCOFFObjectFile::section_rel_begin(DataRefImpl Sec) const { in section_rel_begin()
326 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_begin()
335 relocation_iterator XCOFFObjectFile::section_rel_end(DataRefImpl Sec) const { in section_rel_end()
338 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_end()
598 const char *XCOFFObjectFile::getSectionNameInternal(DataRefImpl Sec) const { in getSectionNameInternal()
599 return is64Bit() ? toSection64(Sec)->Name : toSection32(Sec)->Name; in getSectionNameInternal()
606 int32_t XCOFFObjectFile::getSectionFlags(DataRefImpl Sec) const { in getSectionFlags()
607 return is64Bit() ? toSection64(Sec)->Flags : toSection32(Sec)->Flags; in getSectionFlags()
634 const XCOFFSectionHeader32 &Sec) const { in getLogicalNumberOfRelocationEntries()
636 uint16_t SectionIndex = &Sec - sectionHeaderTable32() + 1; in getLogicalNumberOfRelocationEntries()
638 if (Sec.NumberOfRelocations < XCOFF::RelocOverflow) in getLogicalNumberOfRelocationEntries()
639 return Sec.NumberOfRelocations; in getLogicalNumberOfRelocationEntries()
640 for (const auto &Sec : sections32()) { in getLogicalNumberOfRelocationEntries() local
641 if (Sec.Flags == XCOFF::STYP_OVRFLO && in getLogicalNumberOfRelocationEntries()
642 Sec.NumberOfRelocations == SectionIndex) in getLogicalNumberOfRelocationEntries()
643 return Sec.PhysicalAddress; in getLogicalNumberOfRelocationEntries()
649 XCOFFObjectFile::relocations(const XCOFFSectionHeader32 &Sec) const { in relocations()
651 Sec.FileOffsetToRelocationInfo); in relocations()
652 auto NumRelocEntriesOrErr = getLogicalNumberOfRelocationEntries(Sec); in relocations()