Lines Matching refs:ehdr

65     EhdrType ehdr;  in ParseAllHeaders()  local
66 if (!Read(0, &ehdr, sizeof(ehdr))) { in ParseAllHeaders()
70 if (!ParseElfHeaders<EhdrType>(ehdr)) { in ParseAllHeaders()
75 if (!ParseProgramHeaders<EhdrType, PhdrType>(ehdr)) { in ParseAllHeaders()
80 if (!ParseSectionHeaders<EhdrType, ShdrType>(ehdr)) { in ParseAllHeaders()
88 bool ElfParser::ParseElfHeaders(const EhdrType& ehdr) in ParseElfHeaders() argument
90 if (ehdr.e_shnum == 0) { in ParseElfHeaders()
94 auto machine = ehdr.e_machine; in ParseElfHeaders()
108 elfSize_ = ehdr.e_shoff + ehdr.e_shentsize * ehdr.e_shnum; in ParseElfHeaders()
113 bool ElfParser::ParseProgramHeaders(const EhdrType& ehdr) in ParseProgramHeaders() argument
115 uint64_t offset = ehdr.e_phoff; in ParseProgramHeaders()
117 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in ParseProgramHeaders()
172 bool ElfParser::ParseSectionHeaders(const EhdrType& ehdr) in ParseSectionHeaders() argument
174 uint64_t offset = ehdr.e_shoff; in ParseSectionHeaders()
178 if (ehdr.e_shstrndx < ehdr.e_shnum) { in ParseSectionHeaders()
181 uint64_t shNdxOffset = offset + ehdr.e_shstrndx * ehdr.e_shentsize; in ParseSectionHeaders()
192 … LOGE("e_shstrndx(%u) cannot greater than or equal e_shnum(%u)", ehdr.e_shstrndx, ehdr.e_shnum); in ParseSectionHeaders()
196 offset += ehdr.e_shentsize; in ParseSectionHeaders()
197 for (size_t i = 1; i < ehdr.e_shnum; i++, offset += ehdr.e_shentsize) { in ParseSectionHeaders()
198 if (i == ehdr.e_shstrndx) { in ParseSectionHeaders()
225 if (shdr.sh_link >= ehdr.e_shnum) { in ParseSectionHeaders()