Lines Matching refs:hdr

409 	Elf_Ehdr *hdr;  in parse_elf()  local
415 hdr = grab_file(filename, &info->size); in parse_elf()
416 if (!hdr) { in parse_elf()
425 info->hdr = hdr; in parse_elf()
426 if (info->size < sizeof(*hdr)) { in parse_elf()
431 if ((hdr->e_ident[EI_MAG0] != ELFMAG0) || in parse_elf()
432 (hdr->e_ident[EI_MAG1] != ELFMAG1) || in parse_elf()
433 (hdr->e_ident[EI_MAG2] != ELFMAG2) || in parse_elf()
434 (hdr->e_ident[EI_MAG3] != ELFMAG3)) { in parse_elf()
439 hdr->e_type = TO_NATIVE(hdr->e_type); in parse_elf()
440 hdr->e_machine = TO_NATIVE(hdr->e_machine); in parse_elf()
441 hdr->e_version = TO_NATIVE(hdr->e_version); in parse_elf()
442 hdr->e_entry = TO_NATIVE(hdr->e_entry); in parse_elf()
443 hdr->e_phoff = TO_NATIVE(hdr->e_phoff); in parse_elf()
444 hdr->e_shoff = TO_NATIVE(hdr->e_shoff); in parse_elf()
445 hdr->e_flags = TO_NATIVE(hdr->e_flags); in parse_elf()
446 hdr->e_ehsize = TO_NATIVE(hdr->e_ehsize); in parse_elf()
447 hdr->e_phentsize = TO_NATIVE(hdr->e_phentsize); in parse_elf()
448 hdr->e_phnum = TO_NATIVE(hdr->e_phnum); in parse_elf()
449 hdr->e_shentsize = TO_NATIVE(hdr->e_shentsize); in parse_elf()
450 hdr->e_shnum = TO_NATIVE(hdr->e_shnum); in parse_elf()
451 hdr->e_shstrndx = TO_NATIVE(hdr->e_shstrndx); in parse_elf()
452 sechdrs = (void *)hdr + hdr->e_shoff; in parse_elf()
456 if (hdr->e_shoff > info->size) { in parse_elf()
458 "filesize=%lu\n", (unsigned long)hdr->e_shoff, in parse_elf()
463 if (hdr->e_shnum == SHN_UNDEF) { in parse_elf()
471 info->num_sections = hdr->e_shnum; in parse_elf()
473 if (hdr->e_shstrndx == SHN_XINDEX) { in parse_elf()
477 info->secindex_strings = hdr->e_shstrndx; in parse_elf()
494 secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset; in parse_elf()
503 sizeof(*hdr)); in parse_elf()
510 info->modinfo = (void *)hdr + sechdrs[i].sh_offset; in parse_elf()
526 info->symtab_start = (void *)hdr + in parse_elf()
528 info->symtab_stop = (void *)hdr + in parse_elf()
531 info->strtab = (void *)hdr + in parse_elf()
538 info->symtab_shndx_start = (void *)hdr + in parse_elf()
540 info->symtab_shndx_stop = (void *)hdr + in parse_elf()
572 release_file(info->hdr, info->size); in parse_elf_finish()
583 if (info->hdr->e_machine == EM_PPC) in ignore_undef_symbol()
592 if (info->hdr->e_machine == EM_PPC64) in ignore_undef_symbol()
645 if (info->hdr->e_machine == EM_SPARC || in handle_modversions()
646 info->hdr->e_machine == EM_SPARCV9) { in handle_modversions()
764 return (void *)elf->hdr + in sec_name()
771 return (void *)elf->hdr + in sech_name()
1688 return (void *)elf->hdr + sechdrs[section].sh_offset + in reloc_location()
1704 if (elf->hdr->e_type == ET_EXEC) in addend_386_rel()
1745 r->r_addend = (int)(long)(elf->hdr + in addend_arm_rel()
1787 Elf_Rela *start = (void *)elf->hdr + sechdr->sh_offset; in section_rela()
1799 if (elf->hdr->e_machine == EM_MIPS) { in section_rela()
1833 Elf_Rel *start = (void *)elf->hdr + sechdr->sh_offset; in section_rel()
1845 if (elf->hdr->e_machine == EM_MIPS) { in section_rel()
1860 switch (elf->hdr->e_machine) { in section_rel()
1975 version - (char *)info.hdr); in read_symbols()