Home | History | Annotate | Download | only in Object

Lines Matching refs:Sec

72 const coff_section *COFFObjectFile::toSec(DataRefImpl Sec) const {
73 const coff_section *addr = reinterpret_cast<const coff_section*>(Sec.p);
278 error_code COFFObjectFile::getSectionNext(DataRefImpl Sec,
280 const coff_section *sec = toSec(Sec);
281 sec += 1;
282 Sec.p = reinterpret_cast<uintptr_t>(sec);
283 Result = SectionRef(Sec, this);
287 error_code COFFObjectFile::getSectionName(DataRefImpl Sec,
289 const coff_section *sec = toSec(Sec);
291 if (sec->Name[7] == 0)
293 name = sec->Name;
296 name = StringRef(sec->Name, 8);
310 error_code COFFObjectFile::getSectionAddress(DataRefImpl Sec,
312 const coff_section *sec = toSec(Sec);
313 Result = sec->VirtualAddress;
317 error_code COFFObjectFile::getSectionSize(DataRefImpl Sec,
319 const coff_section *sec = toSec(Sec);
320 Result = sec->SizeOfRawData;
324 error_code COFFObjectFile::getSectionContents(DataRefImpl Sec,
326 const coff_section *sec = toSec(Sec);
330 uintptr_t con_start = uintptr_t(base()) + sec->PointerToRawData;
331 uintptr_t con_end = con_start + sec->SizeOfRawData;
335 sec->SizeOfRawData);
339 error_code COFFObjectFile::getSectionAlignment(DataRefImpl Sec,
341 const coff_section *sec = toSec(Sec);
342 if (!sec)
344 Res = uint64_t(1) << (((sec->Characteristics & 0x00F00000) >> 20) - 1);
348 error_code COFFObjectFile::isSectionText(DataRefImpl Sec,
350 const coff_section *sec = toSec(Sec);
351 Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_CODE;
355 error_code COFFObjectFile::isSectionData(DataRefImpl Sec,
357 const coff_section *sec = toSec(Sec);
358 Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA;
362 error_code COFFObjectFile::isSectionBSS(DataRefImpl Sec,
364 const coff_section *sec = toSec(Sec);
365 Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
369 error_code COFFObjectFile::sectionContainsSymbol(DataRefImpl Sec,
372 const coff_section *sec = toSec(Sec);
376 if (symb_sec == sec)
383 relocation_iterator COFFObjectFile::getSectionRelBegin(DataRefImpl Sec) const {
384 const coff_section *sec = toSec(Sec);
387 if (sec->NumberOfRelocations == 0)
390 ret.p = reinterpret_cast<uintptr_t>(base() + sec->PointerToRelocations);
395 relocation_iterator COFFObjectFile::getSectionRelEnd(DataRefImpl Sec) const {
396 const coff_section *sec = toSec(Sec);
399 if (sec->NumberOfRelocations == 0)
404 base() + sec->PointerToRelocations)
405 + sec->NumberOfRelocations);