Lines Matching refs:Sec
239 void XCOFFObjectFile::moveSectionNext(DataRefImpl &Sec) const { in moveSectionNext()
240 const char *Ptr = reinterpret_cast<const char *>(Sec.p); in moveSectionNext()
241 Sec.p = reinterpret_cast<uintptr_t>(Ptr + getSectionHeaderSize()); in moveSectionNext()
244 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const { in getSectionName()
245 return generateXCOFFFixedNameStringRef(getSectionNameInternal(Sec)); in getSectionName()
248 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const { in getSectionAddress()
252 return toSection64(Sec)->VirtualAddress; in getSectionAddress()
254 return toSection32(Sec)->VirtualAddress; in getSectionAddress()
257 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const { in getSectionIndex()
261 return toSection64(Sec) - sectionHeaderTable64() + 1; in getSectionIndex()
263 return toSection32(Sec) - sectionHeaderTable32() + 1; in getSectionIndex()
266 uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const { in getSectionSize()
270 return toSection64(Sec)->SectionSize; in getSectionSize()
272 return toSection32(Sec)->SectionSize; in getSectionSize()
276 XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const { in getSectionContents()
277 if (isSectionVirtual(Sec)) in getSectionContents()
282 OffsetToRaw = toSection64(Sec)->FileOffsetToRawData; in getSectionContents()
284 OffsetToRaw = toSection32(Sec)->FileOffsetToRawData; in getSectionContents()
287 uint64_t SectionSize = getSectionSize(Sec); in getSectionContents()
294 uint64_t XCOFFObjectFile::getSectionAlignment(DataRefImpl Sec) const { in getSectionAlignment()
300 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::isDebugSection(DataRefImpl Sec) const { in isDebugSection()
319 uint32_t Flags = getSectionFlags(Sec); in isDebugSection()
323 bool XCOFFObjectFile::isSectionVirtual(DataRefImpl Sec) const { in isSectionVirtual()
324 return is64Bit() ? toSection64(Sec)->FileOffsetToRawData == 0 in isSectionVirtual()
325 : toSection32(Sec)->FileOffsetToRawData == 0; in isSectionVirtual()
328 relocation_iterator XCOFFObjectFile::section_rel_begin(DataRefImpl Sec) const { in section_rel_begin()
331 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_begin()
340 relocation_iterator XCOFFObjectFile::section_rel_end(DataRefImpl Sec) const { in section_rel_end()
343 const XCOFFSectionHeader32 *SectionEntPtr = toSection32(Sec); in section_rel_end()
626 const char *XCOFFObjectFile::getSectionNameInternal(DataRefImpl Sec) const { in getSectionNameInternal()
627 return is64Bit() ? toSection64(Sec)->Name : toSection32(Sec)->Name; in getSectionNameInternal()
634 int32_t XCOFFObjectFile::getSectionFlags(DataRefImpl Sec) const { in getSectionFlags()
635 return is64Bit() ? toSection64(Sec)->Flags : toSection32(Sec)->Flags; in getSectionFlags()
662 const XCOFFSectionHeader32 &Sec) const { in getLogicalNumberOfRelocationEntries()
664 uint16_t SectionIndex = &Sec - sectionHeaderTable32() + 1; in getLogicalNumberOfRelocationEntries()
666 if (Sec.NumberOfRelocations < XCOFF::RelocOverflow) in getLogicalNumberOfRelocationEntries()
667 return Sec.NumberOfRelocations; in getLogicalNumberOfRelocationEntries()
668 for (const auto &Sec : sections32()) { in getLogicalNumberOfRelocationEntries() local
669 if (Sec.Flags == XCOFF::STYP_OVRFLO && in getLogicalNumberOfRelocationEntries()
670 Sec.NumberOfRelocations == SectionIndex) in getLogicalNumberOfRelocationEntries()
671 return Sec.PhysicalAddress; in getLogicalNumberOfRelocationEntries()
677 XCOFFObjectFile::relocations(const XCOFFSectionHeader32 &Sec) const { in relocations()
679 Sec.FileOffsetToRelocationInfo); in relocations()
680 auto NumRelocEntriesOrErr = getLogicalNumberOfRelocationEntries(Sec); in relocations()