Lines Matching refs:shdr

176     ShdrType shdr;  in ParseSectionHeaders()  local
182 if (!Read((uintptr_t)shNdxOffset, &shdr, sizeof(shdr))) { in ParseSectionHeaders()
186 secOffset = shdr.sh_offset; in ParseSectionHeaders()
187 secSize = shdr.sh_size; in ParseSectionHeaders()
201 if (!Read((uintptr_t)offset, &shdr, sizeof(shdr))) { in ParseSectionHeaders()
206 if (!GetSectionNameByIndex(secName, shdr.sh_name)) { in ParseSectionHeaders()
211 if (shdr.sh_size != 0 && secName == GNU_DEBUGDATA) { in ParseSectionHeaders()
213 minidebugInfo_->offset = static_cast<uint64_t>(shdr.sh_offset); in ParseSectionHeaders()
214 minidebugInfo_->size = static_cast<uintptr_t>(shdr.sh_size); in ParseSectionHeaders()
218 shdrInfo.addr = static_cast<uint64_t>(shdr.sh_addr); in ParseSectionHeaders()
219 shdrInfo.entSize = static_cast<uint64_t>(shdr.sh_entsize); in ParseSectionHeaders()
220 shdrInfo.size = static_cast<uint64_t>(shdr.sh_size); in ParseSectionHeaders()
221 shdrInfo.offset = static_cast<uint64_t>(shdr.sh_offset); in ParseSectionHeaders()
224 if (shdr.sh_type == SHT_SYMTAB || shdr.sh_type == SHT_DYNSYM) { in ParseSectionHeaders()
225 if (shdr.sh_link >= ehdr.e_shnum) { in ParseSectionHeaders()
229 elfShdr.name = static_cast<uint32_t>(shdr.sh_name); in ParseSectionHeaders()
230 elfShdr.type = static_cast<uint32_t>(shdr.sh_type); in ParseSectionHeaders()
231 elfShdr.flags = static_cast<uint64_t>(shdr.sh_flags); in ParseSectionHeaders()
232 elfShdr.addr = static_cast<uint64_t>(shdr.sh_addr); in ParseSectionHeaders()
233 elfShdr.offset = static_cast<uint64_t>(shdr.sh_offset); in ParseSectionHeaders()
234 elfShdr.size = static_cast<uint64_t>(shdr.sh_size); in ParseSectionHeaders()
235 elfShdr.link = static_cast<uint32_t>(shdr.sh_link); in ParseSectionHeaders()
236 elfShdr.info = static_cast<uint32_t>(shdr.sh_info); in ParseSectionHeaders()
237 elfShdr.addrAlign = static_cast<uint64_t>(shdr.sh_addralign); in ParseSectionHeaders()
238 elfShdr.entSize = static_cast<uint64_t>(shdr.sh_entsize); in ParseSectionHeaders()
306 const auto &shdr = iter; in ParseElfSymbols() local
307 ParseElfSymbols<SymType>(shdr, isFunc); in ParseElfSymbols()
313 bool ElfParser::ParseElfSymbols(ElfShdr shdr, bool isFunc) in ParseElfSymbols() argument
316 if (!GetSectionInfo(linkShdrInfo, shdr.link)) { in ParseElfSymbols()
320 uint32_t count = static_cast<uint32_t>((shdr.entSize != 0) ? (shdr.size / shdr.entSize) : 0); in ParseElfSymbols()
322 uintptr_t offset = static_cast<uintptr_t>(shdr.offset + idx * shdr.entSize); in ParseElfSymbols()
361 for (const auto &shdr : symShdrs_) { in ParseElfSymbolByAddr() local
363 if (!GetSectionInfo(linkShdrInfo, shdr.link)) { in ParseElfSymbolByAddr()
367 … uint32_t count = static_cast<uint32_t>((shdr.entSize != 0) ? (shdr.size / shdr.entSize) : 0); in ParseElfSymbolByAddr()
369 uintptr_t offset = static_cast<uintptr_t>(shdr.offset + idx * shdr.entSize); in ParseElfSymbolByAddr()
430 bool ElfParser::GetSectionInfo(ShdrInfo& shdr, const uint32_t idx) in GetSectionInfo() argument
435 shdr = iter.second; in GetSectionInfo()
442 bool ElfParser::GetSectionInfo(ShdrInfo& shdr, const std::string& secName) in GetSectionInfo() argument
447 shdr = iter.second; in GetSectionInfo()
456 ShdrInfo shdr; in GetSectionData() local
457 if (GetSectionInfo(shdr, secName)) { in GetSectionData()
458 if (Read(shdr.offset, buf, size)) { in GetSectionData()