• Home
  • Raw
  • Download

Lines Matching refs:ehdr

163   EhdrType ehdr;  in ReadAllHeaders()  local
164 if (!memory_->ReadFully(0, &ehdr, sizeof(ehdr))) { in ReadAllHeaders()
172 ReadProgramHeaders<EhdrType, PhdrType>(ehdr, load_bias); in ReadAllHeaders()
173 ReadSectionHeaders<EhdrType, ShdrType>(ehdr); in ReadAllHeaders()
179 EhdrType ehdr; in GetLoadBias() local
180 if (!memory->ReadFully(0, &ehdr, sizeof(ehdr))) { in GetLoadBias()
184 uint64_t offset = ehdr.e_phoff; in GetLoadBias()
185 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in GetLoadBias()
198 void ElfInterface::ReadProgramHeaders(const EhdrType& ehdr, uint64_t* load_bias) { in ReadProgramHeaders() argument
199 uint64_t offset = ehdr.e_phoff; in ReadProgramHeaders()
200 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in ReadProgramHeaders()
293 void ElfInterface::ReadSectionHeaders(const EhdrType& ehdr) { in ReadSectionHeaders() argument
294 uint64_t offset = ehdr.e_shoff; in ReadSectionHeaders()
302 if (ehdr.e_shstrndx < ehdr.e_shnum) { in ReadSectionHeaders()
303 uint64_t sh_offset = offset + ehdr.e_shstrndx * ehdr.e_shentsize; in ReadSectionHeaders()
311 offset += ehdr.e_shentsize; in ReadSectionHeaders()
312 for (size_t i = 1; i < ehdr.e_shnum; i++, offset += ehdr.e_shentsize) { in ReadSectionHeaders()
321 if (shdr.sh_link >= ehdr.e_shnum) { in ReadSectionHeaders()
324 uint64_t str_offset = ehdr.e_shoff + shdr.sh_link * ehdr.e_shentsize; in ReadSectionHeaders()
529 EhdrType ehdr; in GetMaxSizeWithTemplate() local
530 if (!memory->ReadFully(0, &ehdr, sizeof(ehdr))) { in GetMaxSizeWithTemplate()
533 if (ehdr.e_shnum == 0) { in GetMaxSizeWithTemplate()
536 *size = ehdr.e_shoff + ehdr.e_shentsize * ehdr.e_shnum; in GetMaxSizeWithTemplate()
541 EhdrType ehdr; in GetBuildIDInfo() local
542 if (!memory->ReadFully(0, &ehdr, sizeof(ehdr))) { in GetBuildIDInfo()
546 uint64_t offset = ehdr.e_shoff; in GetBuildIDInfo()
550 if (ehdr.e_shstrndx >= ehdr.e_shnum) { in GetBuildIDInfo()
554 uint64_t sh_offset = offset + ehdr.e_shstrndx * ehdr.e_shentsize; in GetBuildIDInfo()
562 offset += ehdr.e_shentsize; in GetBuildIDInfo()
563 for (size_t i = 1; i < ehdr.e_shnum; i++, offset += ehdr.e_shentsize) { in GetBuildIDInfo()