Lines Matching refs:elf_header
212 bool IsValidElf(const GElf_Ehdr *elf_header) { in IsValidElf() argument
213 return memcmp(elf_header, ELFMAG, SELFMAG) == 0; in IsValidElf()
434 bool LoadSymbols(Elf *elf, GElf_Ehdr *elf_header, struct SymbolInfo *symbols, in LoadSymbols() argument
439 reinterpret_cast<GElf_Shdr *>(elf_header->e_shoff + base); in LoadSymbols()
441 if (!FindSectionByName(elf, kStabName, elf_header->e_shstrndx, in LoadSymbols()
447 if (!FindSectionByName(elf, kStabStrName, elf_header->e_shstrndx, in LoadSymbols()
453 if (!FindSectionByName(elf, kSymtabName, elf_header->e_shstrndx, in LoadSymbols()
459 if (!FindSectionByName(elf, kStrtabName, elf_header->e_shstrndx, in LoadSymbols()
657 GElf_Ehdr elf_header; in WriteSymbolFile() local
661 if (gelf_getehdr(elf, &elf_header) == (GElf_Ehdr *)NULL) { in WriteSymbolFile()
666 if (!IsValidElf(&elf_header)) { in WriteSymbolFile()
671 if (!LoadSymbols(elf, &elf_header, &symbols, obj_base)) in WriteSymbolFile()
674 if (WriteModuleInfo(sym_fd, elf_header.e_machine, obj_file) && in WriteSymbolFile()