Lines Matching refs:section_header
205 Elf_Shdr* section_header = GetSectionHeader(i); in Setup() local
206 if (section_header == nullptr) { in Setup()
211 switch (section_header->sh_type) { in Setup()
213 if (!CheckAndSet(section_header->sh_offset, "symtab", in Setup()
220 if (!CheckAndSet(section_header->sh_offset, "dynsym", in Setup()
228 if ((section_header->sh_flags & SHF_ALLOC) != 0) { in Setup()
230 const char* header_name = GetString(*shstrtab_section_header, section_header->sh_name); in Setup()
232 if (!CheckAndSet(section_header->sh_offset, "dynstr", in Setup()
239 const char* header_name = GetString(*shstrtab_section_header, section_header->sh_name); in Setup()
241 if (!CheckAndSet(section_header->sh_offset, "strtab", in Setup()
251 Begin() + section_header->sh_offset) { in Setup()
255 << " != " << reinterpret_cast<void*>(Begin() + section_header->sh_offset); in Setup()
261 if (!CheckAndSet(section_header->sh_offset, "hash section", in Setup()
310 Elf_Shdr* section_header = GetSectionHeader(i); in CheckSectionsLinked() local
312 if (Begin() + section_header->sh_offset == source) { in CheckSectionsLinked()
314 source_section = section_header; in CheckSectionsLinked()
318 } else if (Begin() + section_header->sh_offset == target) { in CheckSectionsLinked()
710 uint8_t* section_header = GetSectionHeadersStart() + (i * GetHeader().e_shentsize); in GetSectionHeader() local
711 if (section_header >= End()) { in GetSectionHeader()
714 return reinterpret_cast<Elf_Shdr*>(section_header); in GetSectionHeader()
723 Elf_Shdr* section_header = GetSectionHeader(i); in FindSectionByType() local
724 if (section_header->sh_type == type) { in FindSectionByType()
725 return section_header; in FindSectionByType()
805 typename ElfTypes::Word ElfFileImpl<ElfTypes>::GetSymbolNum(Elf_Shdr& section_header) const { in GetSymbolNum()
806 CHECK(IsSymbolSectionType(section_header.sh_type)) in GetSymbolNum()
807 << file_path_ << " " << section_header.sh_type; in GetSymbolNum()
808 CHECK_NE(0U, section_header.sh_entsize) << file_path_; in GetSymbolNum()
809 return section_header.sh_size / section_header.sh_entsize; in GetSymbolNum()
985 typename ElfTypes::Rel* ElfFileImpl<ElfTypes>::GetRelSectionStart(Elf_Shdr& section_header) const { in GetRelSectionStart()
986 CHECK(SHT_REL == section_header.sh_type) << file_path_ << " " << section_header.sh_type; in GetRelSectionStart()
987 return reinterpret_cast<Elf_Rel*>(Begin() + section_header.sh_offset); in GetRelSectionStart()
991 typename ElfTypes::Word ElfFileImpl<ElfTypes>::GetRelNum(Elf_Shdr& section_header) const { in GetRelNum()
992 CHECK(SHT_REL == section_header.sh_type) << file_path_ << " " << section_header.sh_type; in GetRelNum()
993 CHECK_NE(0U, section_header.sh_entsize) << file_path_; in GetRelNum()
994 return section_header.sh_size / section_header.sh_entsize; in GetRelNum()
998 typename ElfTypes::Rel& ElfFileImpl<ElfTypes>::GetRel(Elf_Shdr& section_header, Elf_Word i) const { in GetRel() argument
999 CHECK(SHT_REL == section_header.sh_type) << file_path_ << " " << section_header.sh_type; in GetRel()
1000 CHECK_LT(i, GetRelNum(section_header)) << file_path_; in GetRel()
1001 return *(GetRelSectionStart(section_header) + i); in GetRel()
1005 typename ElfTypes::Rela* ElfFileImpl<ElfTypes>::GetRelaSectionStart(Elf_Shdr& section_header) const… in GetRelaSectionStart()
1006 CHECK(SHT_RELA == section_header.sh_type) << file_path_ << " " << section_header.sh_type; in GetRelaSectionStart()
1007 return reinterpret_cast<Elf_Rela*>(Begin() + section_header.sh_offset); in GetRelaSectionStart()
1011 typename ElfTypes::Word ElfFileImpl<ElfTypes>::GetRelaNum(Elf_Shdr& section_header) const { in GetRelaNum()
1012 CHECK(SHT_RELA == section_header.sh_type) << file_path_ << " " << section_header.sh_type; in GetRelaNum()
1013 return section_header.sh_size / section_header.sh_entsize; in GetRelaNum()
1017 typename ElfTypes::Rela& ElfFileImpl<ElfTypes>::GetRela(Elf_Shdr& section_header, Elf_Word i) const… in GetRela() argument
1018 CHECK(SHT_RELA == section_header.sh_type) << file_path_ << " " << section_header.sh_type; in GetRela()
1019 CHECK_LT(i, GetRelaNum(section_header)) << file_path_; in GetRela()
1020 return *(GetRelaSectionStart(section_header) + i); in GetRela()