Lines Matching refs:elf_header
177 bool LoadStabs(const typename ElfClass::Ehdr* elf_header,
189 GetOffset<ElfClass, uint8_t>(elf_header, stab_section->sh_offset);
191 GetOffset<ElfClass, uint8_t>(elf_header, stabstr_section->sh_offset);
227 const typename ElfClass::Ehdr* elf_header,
244 GetOffset<ElfClass, Shdr>(elf_header, elf_header->e_shoff);
245 int num_sections = elf_header->e_shnum;
246 const Shdr* section_names = sections + elf_header->e_shstrndx;
249 string name = GetOffset<ElfClass, char>(elf_header,
252 const char* contents = GetOffset<ElfClass, char>(elf_header,
292 bool DwarfCFIRegisterNames(const typename ElfClass::Ehdr* elf_header,
294 switch (elf_header->e_machine) {
317 const typename ElfClass::Ehdr* elf_header,
328 if (!DwarfCFIRegisterNames<ElfClass>(elf_header, ®ister_names)) {
331 dwarf_filename.c_str(), elf_header->e_machine);
340 GetOffset<ElfClass, char>(elf_header, section->sh_offset);
368 void** elf_header) {
390 *elf_header = obj_base;
391 if (!IsValidElf(*elf_header)) {
398 // Get the endianness of ELF_HEADER. If it's invalid, return false.
400 bool ElfEndianness(const typename ElfClass::Ehdr* elf_header,
402 if (elf_header->e_ident[EI_DATA] == ELFDATA2LSB) {
406 if (elf_header->e_ident[EI_DATA] == ELFDATA2MSB) {
412 elf_header->e_ident[EI_DATA]);
587 const typename ElfClass::Ehdr* elf_header,
598 GetOffset<ElfClass, Phdr>(elf_header, elf_header->e_phoff),
599 elf_header->e_phnum);
604 elf_header->e_machine == EM_MIPS ? SHT_MIPS_DWARF : SHT_PROGBITS;
606 GetOffset<ElfClass, Shdr>(elf_header, elf_header->e_shoff);
607 const Shdr* section_names = sections + elf_header->e_shstrndx;
609 GetOffset<ElfClass, char>(elf_header, section_names->sh_offset);
620 elf_header->e_shnum);
627 if (!LoadStabs<ElfClass>(elf_header, stab_section, stabstr_section,
640 elf_header->e_shnum);
645 if (!LoadDwarf<ElfClass>(obj_file, elf_header, big_endian,
656 elf_header->e_shnum);
660 elf_header->e_shnum);
665 GetOffset<ElfClass, uint8_t>(elf_header,
668 GetOffset<ElfClass, uint8_t>(elf_header,
688 elf_header->e_shnum);
695 LoadDwarfCFI<ElfClass>(obj_file, elf_header, ".debug_frame",
706 elf_header->e_shnum);
713 elf_header->e_shnum);
717 elf_header->e_shnum);
721 LoadDwarfCFI<ElfClass>(obj_file, elf_header, ".eh_frame",
738 names_end, elf_header->e_shnum);
742 GetOffset<ElfClass, char>(elf_header,
774 // ELF_HEADER.
776 const char* ElfArchitecture(const typename ElfClass::Ehdr* elf_header) {
778 Half arch = elf_header->e_machine;
855 bool ReadSymbolDataElfClass(const typename ElfClass::Ehdr* elf_header,
866 if (!google_breakpad::FileID::ElfFileIdentifierFromMappedFile(elf_header,
873 const char *architecture = ElfArchitecture<ElfClass>(elf_header);
876 obj_filename.c_str(), elf_header->e_machine);
882 if (!ElfEndianness<ElfClass>(elf_header, &big_endian))
891 if (!LoadSymbols<ElfClass>(obj_filename, big_endian, elf_header,
968 void* elf_header = NULL;
969 if (!LoadELF(obj_file, &map_wrapper, &elf_header))
972 return ReadSymbolDataInternal(reinterpret_cast<uint8_t*>(elf_header),