Lines Matching refs:ehdr
99 explicit SectionLocator(const Elf32_Ehdr* ehdr) { in SectionLocator() argument
101 reinterpret_cast<const char*>(ehdr) + ehdr->e_shoff); in SectionLocator()
104 reinterpret_cast<const char*>(ehdr) + shdr_[ehdr->e_shstrndx].sh_offset; in SectionLocator()
105 nsections_ = ehdr->e_shnum; in SectionLocator()
122 void LocateSymbols(const Elf32_Ehdr* ehdr, in LocateSymbols() argument
128 reinterpret_cast<const char*>(ehdr) + ehdr->e_shoff); in LocateSymbols()
131 reinterpret_cast<const char*>(ehdr) + strtab->sh_offset; in LocateSymbols()
136 reinterpret_cast<const char*>(ehdr) + symtab->sh_offset); in LocateSymbols()
138 if ((sym[snum].st_shndx > 0) && (sym[snum].st_shndx < ehdr->e_shnum) && in LocateSymbols()
169 StaticSymbolVisitor(const Elf32_Ehdr* ehdr, SymbolTable* symbols) in StaticSymbolVisitor() argument
170 : ehdr_(ehdr), in StaticSymbolVisitor()
172 reinterpret_cast<const char*>(ehdr) + ehdr->e_shoff)), in StaticSymbolVisitor()
240 const Elf32_Ehdr* ehdr = reinterpret_cast<const Elf32_Ehdr*>(base_addr); in main() local
241 if ((ehdr->e_ident[0] != 0x7f) || (ehdr->e_ident[1] != 'E') || in main()
242 (ehdr->e_ident[2] != 'L') || (ehdr->e_ident[3] != 'F') || in main()
243 (ehdr->e_ehsize != sizeof(Elf32_Ehdr))) { in main()
249 if (ehdr->e_machine != EM_ARM) { in main()
257 reinterpret_cast<const Elf32_Shdr*>(base_addr + ehdr->e_shoff); in main()
259 SectionLocator section_locator(ehdr); in main()
265 LocateSymbols(ehdr, in main()
271 StaticSymbolVisitor static_visitor(ehdr, &symbol_names); in main()
272 LocateSymbols(ehdr, in main()