Lines Matching refs:hdr
323 return (void *)info->hdr + sechdr->sh_offset + offset; in sym_get_data_by_offset()
408 Elf_Ehdr *hdr; in parse_elf() local
414 hdr = grab_file(filename, &info->size); in parse_elf()
415 if (!hdr) { in parse_elf()
424 info->hdr = hdr; in parse_elf()
425 if (info->size < sizeof(*hdr)) { in parse_elf()
430 if ((hdr->e_ident[EI_MAG0] != ELFMAG0) || in parse_elf()
431 (hdr->e_ident[EI_MAG1] != ELFMAG1) || in parse_elf()
432 (hdr->e_ident[EI_MAG2] != ELFMAG2) || in parse_elf()
433 (hdr->e_ident[EI_MAG3] != ELFMAG3)) { in parse_elf()
438 switch (hdr->e_ident[EI_DATA]) { in parse_elf()
450 hdr->e_type = TO_NATIVE(hdr->e_type); in parse_elf()
451 hdr->e_machine = TO_NATIVE(hdr->e_machine); in parse_elf()
452 hdr->e_version = TO_NATIVE(hdr->e_version); in parse_elf()
453 hdr->e_entry = TO_NATIVE(hdr->e_entry); in parse_elf()
454 hdr->e_phoff = TO_NATIVE(hdr->e_phoff); in parse_elf()
455 hdr->e_shoff = TO_NATIVE(hdr->e_shoff); in parse_elf()
456 hdr->e_flags = TO_NATIVE(hdr->e_flags); in parse_elf()
457 hdr->e_ehsize = TO_NATIVE(hdr->e_ehsize); in parse_elf()
458 hdr->e_phentsize = TO_NATIVE(hdr->e_phentsize); in parse_elf()
459 hdr->e_phnum = TO_NATIVE(hdr->e_phnum); in parse_elf()
460 hdr->e_shentsize = TO_NATIVE(hdr->e_shentsize); in parse_elf()
461 hdr->e_shnum = TO_NATIVE(hdr->e_shnum); in parse_elf()
462 hdr->e_shstrndx = TO_NATIVE(hdr->e_shstrndx); in parse_elf()
463 sechdrs = (void *)hdr + hdr->e_shoff; in parse_elf()
467 if (hdr->e_type != ET_REL) in parse_elf()
471 if (hdr->e_shoff > info->size) in parse_elf()
473 (unsigned long)hdr->e_shoff, filename, info->size); in parse_elf()
475 if (hdr->e_shnum == SHN_UNDEF) { in parse_elf()
483 info->num_sections = hdr->e_shnum; in parse_elf()
485 if (hdr->e_shstrndx == SHN_XINDEX) { in parse_elf()
489 info->secindex_strings = hdr->e_shstrndx; in parse_elf()
506 secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset; in parse_elf()
514 sizeof(*hdr)); in parse_elf()
520 info->modinfo = (void *)hdr + sechdrs[i].sh_offset; in parse_elf()
525 info->no_trim_symbol = (void *)hdr + sechdrs[i].sh_offset; in parse_elf()
532 info->symtab_start = (void *)hdr + in parse_elf()
534 info->symtab_stop = (void *)hdr + in parse_elf()
537 info->strtab = (void *)hdr + in parse_elf()
544 info->symtab_shndx_start = (void *)hdr + in parse_elf()
546 info->symtab_shndx_stop = (void *)hdr + in parse_elf()
581 release_file(info->hdr, info->size); in parse_elf_finish()
592 if (info->hdr->e_machine == EM_PPC) in ignore_undef_symbol()
601 if (info->hdr->e_machine == EM_PPC64) in ignore_undef_symbol()
630 if (info->hdr->e_machine == EM_SPARC || in handle_symbol()
631 info->hdr->e_machine == EM_SPARCV9) { in handle_symbol()
1123 if (elf->hdr->e_ident[EI_CLASS] == ELFCLASS64 && in check_export_symbol()
1124 elf->hdr->e_machine == EM_PARISC && in check_export_symbol()
1312 bool is_64bit = (elf->hdr->e_ident[EI_CLASS] == ELFCLASS64); in get_rel_type_and_sym()
1314 if (elf->hdr->e_machine == EM_MIPS && is_64bit) { in get_rel_type_and_sym()
1348 switch (elf->hdr->e_machine) { in section_rela()
1391 switch (elf->hdr->e_machine) { in section_rel()