Lines Matching refs:elf

100 static int	handle_core(char const *, Elf *elf, GElf_Ehdr *);
244 xlatetom(Elf *elf, GElf_Ehdr *elfhdr, void *_src, void *_dst, in xlatetom() argument
256 return (gelf_xlatetom(elf, &dst, &src, elfhdr->e_ident[EI_DATA]) != in xlatetom()
292 handle_core_note(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phdr *phdr, in handle_core_note() argument
304 if (elf == NULL || elfhdr == NULL || phdr == NULL) in handle_core_note()
307 data = elf_rawfile(elf, &max_size); in handle_core_note()
318 if (xlatetom(elf, elfhdr, &nhdr->n_type, &nhdr_l.n_type, in handle_core_note()
320 xlatetom(elf, elfhdr, &nhdr->n_descsz, &nhdr_l.n_descsz, in handle_core_note()
322 xlatetom(elf, elfhdr, &nhdr->n_namesz, &nhdr_l.n_namesz, in handle_core_note()
360 (void)xlatetom(elf, elfhdr, &raw_size, in handle_core_note()
362 (void)xlatetom(elf, elfhdr, &pid, &pid, in handle_core_note()
480 handle_phdr(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phdr *phdr, in handle_phdr() argument
487 if (elf == NULL || elfhdr == NULL || phdr == NULL) in handle_phdr()
531 handle_core(char const *name, Elf *elf, GElf_Ehdr *elfhdr) in handle_core() argument
538 if (name == NULL || elf == NULL || elfhdr == NULL) in handle_core()
550 if (gelf_getphdr(elf, i, &phdr) != NULL) { in handle_core()
552 handle_phdr(elf, elfhdr, &phdr, i, "note"); in handle_core()
553 handle_core_note(elf, elfhdr, &phdr, in handle_core()
584 handle_phdr(elf, elfhdr, &phdr, i, seg_name); in handle_core()
619 Elf *elf, *elf1; in handle_elf() local
627 while ((elf = elf_begin(fd, elf_cmd, elf1)) != NULL) { in handle_elf()
628 arhdr = elf_getarhdr(elf); in handle_elf()
629 if (elf_kind(elf) == ELF_K_NONE && arhdr == NULL) { in handle_elf()
630 (void) elf_end(elf); in handle_elf()
635 if (elf_kind(elf) != ELF_K_ELF || in handle_elf()
636 (gelf_getehdr(elf, &elfhdr) == NULL)) { in handle_elf()
637 elf_cmd = elf_next(elf); in handle_elf()
638 (void) elf_end(elf); in handle_elf()
645 exit_code = handle_core(name, elf, &elfhdr); in handle_elf()
646 (void) elf_end(elf); in handle_elf()
654 while ((scn = elf_nextscn(elf, scn)) != NULL) { in handle_elf()
661 while ((scn = elf_nextscn(elf, scn)) != NULL) { in handle_elf()
663 sysv_calc(elf, &elfhdr, &shdr); in handle_elf()
677 elf_cmd = elf_next(elf); in handle_elf()
678 (void) elf_end(elf); in handle_elf()
705 sysv_calc(Elf *elf, GElf_Ehdr *elfhdr, GElf_Shdr *shdr) in sysv_calc() argument
709 section_name = elf_strptr(elf, elfhdr->e_shstrndx, in sysv_calc()