Lines Matching refs:Sec

254   const coff_section *Sec = nullptr;  in getSymbolSection()  local
255 if (std::error_code EC = getSection(Symb.getSectionNumber(), Sec)) in getSymbolSection()
258 Ret.p = reinterpret_cast<uintptr_t>(Sec); in getSymbolSection()
268 const coff_section *Sec = toSec(Ref); in moveSectionNext() local
269 Sec += 1; in moveSectionNext()
270 Ref.p = reinterpret_cast<uintptr_t>(Sec); in moveSectionNext()
275 const coff_section *Sec = toSec(Ref); in getSectionName() local
276 return getSectionName(Sec, Result); in getSectionName()
280 const coff_section *Sec = toSec(Ref); in getSectionAddress() local
281 uint64_t Result = Sec->VirtualAddress; in getSectionAddress()
289 uint64_t COFFObjectFile::getSectionIndex(DataRefImpl Sec) const { in getSectionIndex()
290 return toSec(Sec) - SectionTable; in getSectionIndex()
299 const coff_section *Sec = toSec(Ref); in getSectionContents() local
301 std::error_code EC = getSectionContents(Sec, Res); in getSectionContents()
307 const coff_section *Sec = toSec(Ref); in getSectionAlignment() local
308 return Sec->getAlignment(); in getSectionAlignment()
311 bool COFFObjectFile::isSectionCompressed(DataRefImpl Sec) const { in isSectionCompressed()
316 const coff_section *Sec = toSec(Ref); in isSectionText() local
317 return Sec->Characteristics & COFF::IMAGE_SCN_CNT_CODE; in isSectionText()
321 const coff_section *Sec = toSec(Ref); in isSectionData() local
322 return Sec->Characteristics & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA; in isSectionData()
326 const coff_section *Sec = toSec(Ref); in isSectionBSS() local
330 return (Sec->Characteristics & BssFlags) == BssFlags; in isSectionBSS()
333 unsigned COFFObjectFile::getSectionID(SectionRef Sec) const { in getSectionID()
335 uintptr_t(Sec.getRawDataRefImpl().p) - uintptr_t(SectionTable); in getSectionID()
341 const coff_section *Sec = toSec(Ref); in isSectionVirtual() local
344 return Sec->PointerToRawData == 0; in isSectionVirtual()
347 static uint32_t getNumberOfRelocations(const coff_section *Sec, in getNumberOfRelocations() argument
353 if (Sec->hasExtendedRelocations()) { in getNumberOfRelocations()
356 base + Sec->PointerToRelocations))) in getNumberOfRelocations()
361 return Sec->NumberOfRelocations; in getNumberOfRelocations()
365 getFirstReloc(const coff_section *Sec, MemoryBufferRef M, const uint8_t *Base) { in getFirstReloc() argument
366 uint64_t NumRelocs = getNumberOfRelocations(Sec, M, Base); in getFirstReloc()
370 Base + Sec->PointerToRelocations); in getFirstReloc()
371 if (Sec->hasExtendedRelocations()) { in getFirstReloc()
383 const coff_section *Sec = toSec(Ref); in section_rel_begin() local
384 const coff_relocation *begin = getFirstReloc(Sec, Data, base()); in section_rel_begin()
385 if (begin && Sec->VirtualAddress != 0) in section_rel_begin()
393 const coff_section *Sec = toSec(Ref); in section_rel_end() local
394 const coff_relocation *I = getFirstReloc(Sec, Data, base()); in section_rel_end()
396 I += getNumberOfRelocations(Sec, Data, base()); in section_rel_end()
1078 std::error_code COFFObjectFile::getSectionName(const coff_section *Sec, in getSectionName() argument
1081 if (Sec->Name[COFF::NameSize - 1] == 0) in getSectionName()
1083 Name = Sec->Name; in getSectionName()
1086 Name = StringRef(Sec->Name, COFF::NameSize); in getSectionName()
1106 uint64_t COFFObjectFile::getSectionSize(const coff_section *Sec) const { in getSectionSize()
1118 return std::min(Sec->VirtualSize, Sec->SizeOfRawData); in getSectionSize()
1119 return Sec->SizeOfRawData; in getSectionSize()
1123 COFFObjectFile::getSectionContents(const coff_section *Sec, in getSectionContents() argument
1127 if (Sec->PointerToRawData == 0) in getSectionContents()
1132 uintptr_t ConStart = uintptr_t(base()) + Sec->PointerToRawData; in getSectionContents()
1133 uint32_t SectionSize = getSectionSize(Sec); in getSectionContents()
1196 COFFObjectFile::getRelocations(const coff_section *Sec) const { in getRelocations()
1197 return {getFirstReloc(Sec, Data, base()), in getRelocations()
1198 getNumberOfRelocations(Sec, Data, base())}; in getRelocations()