Lines Matching refs:Sec
242 const coff_section *Sec = nullptr; in getSymbolSection() local
243 if (std::error_code EC = getSection(Symb.getSectionNumber(), Sec)) in getSymbolSection()
246 Ret.p = reinterpret_cast<uintptr_t>(Sec); in getSymbolSection()
256 const coff_section *Sec = toSec(Ref); in moveSectionNext() local
257 Sec += 1; in moveSectionNext()
258 Ref.p = reinterpret_cast<uintptr_t>(Sec); in moveSectionNext()
263 const coff_section *Sec = toSec(Ref); in getSectionName() local
264 return getSectionName(Sec, Result); in getSectionName()
268 const coff_section *Sec = toSec(Ref); in getSectionAddress() local
269 uint64_t Result = Sec->VirtualAddress; in getSectionAddress()
283 const coff_section *Sec = toSec(Ref); in getSectionContents() local
285 std::error_code EC = getSectionContents(Sec, Res); in getSectionContents()
291 const coff_section *Sec = toSec(Ref); in getSectionAlignment() local
292 return Sec->getAlignment(); in getSectionAlignment()
295 bool COFFObjectFile::isSectionCompressed(DataRefImpl Sec) const { in isSectionCompressed()
300 const coff_section *Sec = toSec(Ref); in isSectionText() local
301 return Sec->Characteristics & COFF::IMAGE_SCN_CNT_CODE; in isSectionText()
305 const coff_section *Sec = toSec(Ref); in isSectionData() local
306 return Sec->Characteristics & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA; in isSectionData()
310 const coff_section *Sec = toSec(Ref); in isSectionBSS() local
314 return (Sec->Characteristics & BssFlags) == BssFlags; in isSectionBSS()
317 unsigned COFFObjectFile::getSectionID(SectionRef Sec) const { in getSectionID()
319 uintptr_t(Sec.getRawDataRefImpl().p) - uintptr_t(SectionTable); in getSectionID()
325 const coff_section *Sec = toSec(Ref); in isSectionVirtual() local
328 return Sec->PointerToRawData == 0; in isSectionVirtual()
331 static uint32_t getNumberOfRelocations(const coff_section *Sec, in getNumberOfRelocations() argument
337 if (Sec->hasExtendedRelocations()) { in getNumberOfRelocations()
340 base + Sec->PointerToRelocations))) in getNumberOfRelocations()
345 return Sec->NumberOfRelocations; in getNumberOfRelocations()
349 getFirstReloc(const coff_section *Sec, MemoryBufferRef M, const uint8_t *Base) { in getFirstReloc() argument
350 uint64_t NumRelocs = getNumberOfRelocations(Sec, M, Base); in getFirstReloc()
354 Base + Sec->PointerToRelocations); in getFirstReloc()
355 if (Sec->hasExtendedRelocations()) { in getFirstReloc()
366 const coff_section *Sec = toSec(Ref); in section_rel_begin() local
367 const coff_relocation *begin = getFirstReloc(Sec, Data, base()); in section_rel_begin()
368 if (begin && Sec->VirtualAddress != 0) in section_rel_begin()
376 const coff_section *Sec = toSec(Ref); in section_rel_end() local
377 const coff_relocation *I = getFirstReloc(Sec, Data, base()); in section_rel_end()
379 I += getNumberOfRelocations(Sec, Data, base()); in section_rel_end()
988 std::error_code COFFObjectFile::getSectionName(const coff_section *Sec, in getSectionName() argument
991 if (Sec->Name[COFF::NameSize - 1] == 0) in getSectionName()
993 Name = Sec->Name; in getSectionName()
996 Name = StringRef(Sec->Name, COFF::NameSize); in getSectionName()
1016 uint64_t COFFObjectFile::getSectionSize(const coff_section *Sec) const { in getSectionSize()
1028 return std::min(Sec->VirtualSize, Sec->SizeOfRawData); in getSectionSize()
1029 return Sec->SizeOfRawData; in getSectionSize()
1033 COFFObjectFile::getSectionContents(const coff_section *Sec, in getSectionContents() argument
1037 if (Sec->PointerToRawData == 0) in getSectionContents()
1042 uintptr_t ConStart = uintptr_t(base()) + Sec->PointerToRawData; in getSectionContents()
1043 uint32_t SectionSize = getSectionSize(Sec); in getSectionContents()
1106 COFFObjectFile::getRelocations(const coff_section *Sec) const { in getRelocations()
1107 const coff_relocation *I = getFirstReloc(Sec, Data, base()); in getRelocations()
1110 E += getNumberOfRelocations(Sec, Data, base()); in getRelocations()