Lines Matching refs:Sec
243 const coff_section *Sec = nullptr; in getSymbolSection() local
244 if (std::error_code EC = getSection(Symb.getSectionNumber(), Sec)) in getSymbolSection()
247 Ret.p = reinterpret_cast<uintptr_t>(Sec); in getSymbolSection()
257 const coff_section *Sec = toSec(Ref); in moveSectionNext() local
258 Sec += 1; in moveSectionNext()
259 Ref.p = reinterpret_cast<uintptr_t>(Sec); in moveSectionNext()
264 const coff_section *Sec = toSec(Ref); in getSectionName() local
265 return getSectionName(Sec, Result); in getSectionName()
269 const coff_section *Sec = toSec(Ref); in getSectionAddress() local
270 uint64_t Result = Sec->VirtualAddress; in getSectionAddress()
284 const coff_section *Sec = toSec(Ref); in getSectionContents() local
286 std::error_code EC = getSectionContents(Sec, Res); in getSectionContents()
292 const coff_section *Sec = toSec(Ref); in getSectionAlignment() local
293 return uint64_t(1) << (((Sec->Characteristics & 0x00F00000) >> 20) - 1); in getSectionAlignment()
297 const coff_section *Sec = toSec(Ref); in isSectionText() local
298 return Sec->Characteristics & COFF::IMAGE_SCN_CNT_CODE; in isSectionText()
302 const coff_section *Sec = toSec(Ref); in isSectionData() local
303 return Sec->Characteristics & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA; in isSectionData()
307 const coff_section *Sec = toSec(Ref); in isSectionBSS() local
311 return (Sec->Characteristics & BssFlags) == BssFlags; in isSectionBSS()
314 unsigned COFFObjectFile::getSectionID(SectionRef Sec) const { in getSectionID()
316 uintptr_t(Sec.getRawDataRefImpl().p) - uintptr_t(SectionTable); in getSectionID()
322 const coff_section *Sec = toSec(Ref); in isSectionVirtual() local
325 return Sec->PointerToRawData == 0; in isSectionVirtual()
328 static uint32_t getNumberOfRelocations(const coff_section *Sec, in getNumberOfRelocations() argument
334 if (Sec->hasExtendedRelocations()) { in getNumberOfRelocations()
337 base + Sec->PointerToRelocations))) in getNumberOfRelocations()
342 return Sec->NumberOfRelocations; in getNumberOfRelocations()
346 getFirstReloc(const coff_section *Sec, MemoryBufferRef M, const uint8_t *Base) { in getFirstReloc() argument
347 uint64_t NumRelocs = getNumberOfRelocations(Sec, M, Base); in getFirstReloc()
351 Base + Sec->PointerToRelocations); in getFirstReloc()
352 if (Sec->hasExtendedRelocations()) { in getFirstReloc()
363 const coff_section *Sec = toSec(Ref); in section_rel_begin() local
364 const coff_relocation *begin = getFirstReloc(Sec, Data, base()); in section_rel_begin()
365 if (begin && Sec->VirtualAddress != 0) in section_rel_begin()
373 const coff_section *Sec = toSec(Ref); in section_rel_end() local
374 const coff_relocation *I = getFirstReloc(Sec, Data, base()); in section_rel_end()
376 I += getNumberOfRelocations(Sec, Data, base()); in section_rel_end()
903 std::error_code COFFObjectFile::getSectionName(const coff_section *Sec, in getSectionName() argument
906 if (Sec->Name[COFF::NameSize - 1] == 0) in getSectionName()
908 Name = Sec->Name; in getSectionName()
911 Name = StringRef(Sec->Name, COFF::NameSize); in getSectionName()
931 uint64_t COFFObjectFile::getSectionSize(const coff_section *Sec) const { in getSectionSize()
943 return std::min(Sec->VirtualSize, Sec->SizeOfRawData); in getSectionSize()
944 return Sec->SizeOfRawData; in getSectionSize()
948 COFFObjectFile::getSectionContents(const coff_section *Sec, in getSectionContents() argument
952 assert((Sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) == 0 && in getSectionContents()
957 uintptr_t ConStart = uintptr_t(base()) + Sec->PointerToRawData; in getSectionContents()
958 uint32_t SectionSize = getSectionSize(Sec); in getSectionContents()
1021 COFFObjectFile::getRelocations(const coff_section *Sec) const { in getRelocations()
1022 const coff_relocation *I = getFirstReloc(Sec, Data, base()); in getRelocations()
1025 E += getNumberOfRelocations(Sec, Data, base()); in getRelocations()