Lines Matching refs:hdr

331 	return (void *)info->hdr + sechdr->sh_offset + offset;
418 Elf_Ehdr *hdr;
424 hdr = grab_file(filename, &info->size);
425 if (!hdr) {
434 info->hdr = hdr;
435 if (info->size < sizeof(*hdr)) {
440 if ((hdr->e_ident[EI_MAG0] != ELFMAG0) ||
441 (hdr->e_ident[EI_MAG1] != ELFMAG1) ||
442 (hdr->e_ident[EI_MAG2] != ELFMAG2) ||
443 (hdr->e_ident[EI_MAG3] != ELFMAG3)) {
448 hdr->e_type = TO_NATIVE(hdr->e_type);
449 hdr->e_machine = TO_NATIVE(hdr->e_machine);
450 hdr->e_version = TO_NATIVE(hdr->e_version);
451 hdr->e_entry = TO_NATIVE(hdr->e_entry);
452 hdr->e_phoff = TO_NATIVE(hdr->e_phoff);
453 hdr->e_shoff = TO_NATIVE(hdr->e_shoff);
454 hdr->e_flags = TO_NATIVE(hdr->e_flags);
455 hdr->e_ehsize = TO_NATIVE(hdr->e_ehsize);
456 hdr->e_phentsize = TO_NATIVE(hdr->e_phentsize);
457 hdr->e_phnum = TO_NATIVE(hdr->e_phnum);
458 hdr->e_shentsize = TO_NATIVE(hdr->e_shentsize);
459 hdr->e_shnum = TO_NATIVE(hdr->e_shnum);
460 hdr->e_shstrndx = TO_NATIVE(hdr->e_shstrndx);
461 sechdrs = (void *)hdr + hdr->e_shoff;
465 if (hdr->e_type != ET_REL)
469 if (hdr->e_shoff > info->size)
471 (unsigned long)hdr->e_shoff, filename, info->size);
473 if (hdr->e_shnum == SHN_UNDEF) {
481 info->num_sections = hdr->e_shnum;
483 if (hdr->e_shstrndx == SHN_XINDEX) {
487 info->secindex_strings = hdr->e_shstrndx;
504 secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset;
512 sizeof(*hdr));
518 info->modinfo = (void *)hdr + sechdrs[i].sh_offset;
527 info->symtab_start = (void *)hdr +
529 info->symtab_stop = (void *)hdr +
532 info->strtab = (void *)hdr +
539 info->symtab_shndx_start = (void *)hdr +
541 info->symtab_shndx_stop = (void *)hdr +
576 release_file(info->hdr, info->size);
587 if (info->hdr->e_machine == EM_PPC)
596 if (info->hdr->e_machine == EM_PPC64)
625 if (info->hdr->e_machine == EM_SPARC ||
626 info->hdr->e_machine == EM_SPARCV9) {
1135 if (elf->hdr->e_ident[EI_CLASS] == ELFCLASS64 &&
1136 elf->hdr->e_machine == EM_PARISC &&
1358 bool is_64bit = (elf->hdr->e_ident[EI_CLASS] == ELFCLASS64);
1360 if (elf->hdr->e_machine == EM_MIPS && is_64bit) {
1394 switch (elf->hdr->e_machine) {
1437 switch (elf->hdr->e_machine) {