Lines Matching refs:Sec
336 virtual error_code getSectionNext(DataRefImpl Sec, SectionRef &Res) const;
337 virtual error_code getSectionName(DataRefImpl Sec, StringRef &Res) const;
338 virtual error_code getSectionAddress(DataRefImpl Sec, uint64_t &Res) const;
339 virtual error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const;
340 virtual error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const;
341 virtual error_code getSectionAlignment(DataRefImpl Sec, uint64_t &Res) const;
342 virtual error_code isSectionText(DataRefImpl Sec, bool &Res) const;
343 virtual error_code isSectionData(DataRefImpl Sec, bool &Res) const;
344 virtual error_code isSectionBSS(DataRefImpl Sec, bool &Res) const;
345 virtual error_code sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb,
347 virtual relocation_iterator getSectionRelBegin(DataRefImpl Sec) const;
348 virtual relocation_iterator getSectionRelEnd(DataRefImpl Sec) const;
655 ::getSectionNext(DataRefImpl Sec, SectionRef &Result) const {
656 const uint8_t *sec = reinterpret_cast<const uint8_t *>(Sec.p);
657 sec += Header->e_shentsize;
658 Sec.p = reinterpret_cast<intptr_t>(sec);
659 Result = SectionRef(Sec, this);
665 ::getSectionName(DataRefImpl Sec,
667 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
668 Result = StringRef(getString(dot_shstrtab_sec, sec->sh_name));
674 ::getSectionAddress(DataRefImpl Sec,
676 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
677 Result = sec->sh_addr;
683 ::getSectionSize(DataRefImpl Sec,
685 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
686 Result = sec->sh_size;
692 ::getSectionContents(DataRefImpl Sec,
694 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
695 const char *start = (const char*)base() + sec->sh_offset;
696 Result = StringRef(start, sec->sh_size);
702 ::getSectionAlignment(DataRefImpl Sec,
704 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
705 Result = sec->sh_addralign;
711 ::isSectionText(DataRefImpl Sec,
713 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
714 if (sec->sh_flags & ELF::SHF_EXECINSTR)
723 ::isSectionData(DataRefImpl Sec,
725 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
726 if (sec->sh_flags & (ELF::SHF_ALLOC | ELF::SHF_WRITE)
727 && sec->sh_type == ELF::SHT_PROGBITS)
736 ::isSectionBSS(DataRefImpl Sec,
738 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
739 if (sec->sh_flags & (ELF::SHF_ALLOC | ELF::SHF_WRITE)
740 && sec->sh_type == ELF::SHT_NOBITS)
749 ::sectionContainsSymbol(DataRefImpl Sec,
759 ::getSectionRelBegin(DataRefImpl Sec) const {
762 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
763 typename RelocMap_t::const_iterator ittr = SectionRelocMap.find(sec);
764 if (sec != 0 && ittr != SectionRelocMap.end()) {
774 ::getSectionRelEnd(DataRefImpl Sec) const {
777 const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
778 typename RelocMap_t::const_iterator ittr = SectionRelocMap.find(sec);
779 if (sec != 0 && ittr != SectionRelocMap.end()) {
825 const Elf_Shdr *sec = getSection(Rel.w.b);
826 switch (sec->sh_type) {
839 IndexMap_t::const_iterator it = SymbolTableSectionsIndexMap.find(sec->sh_link);
853 const Elf_Shdr *sec = getSection(Rel.w.b);
854 switch (sec->sh_type) {
875 const Elf_Shdr *sec = getSection(Rel.w.b);
876 switch (sec->sh_type) {
898 const Elf_Shdr *sec = getSection(Rel.w.b);
901 switch (sec->sh_type) {
1011 const Elf_Shdr *sec = getSection(Rel.w.b);
1012 switch (sec->sh_type) {
1030 const Elf_Shdr *sec = getSection(Rel.w.b);
1035 switch (sec->sh_type) {
1051 const Elf_Sym *symb = getEntry<Elf_Sym>(sec->sh_link, symbol_index);
1328 const Elf_Shdr *sec = getSection(Symb.d.b);
1329 if (sec->sh_type != ELF::SHT_SYMTAB || sec->sh_type != ELF::SHT_DYNSYM)
1332 return sec;