Lines Matching defs:elf
130 static int handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
134 static int handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
368 Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
369 if (elf != NULL)
371 if (elf_kind (elf) == ELF_K_ELF)
373 int result = handle_elf (fd, elf, more_than_one ? "" : NULL,
376 if (elf_end (elf) != 0)
384 else if (elf_kind (elf) == ELF_K_AR)
386 int result = handle_ar (fd, elf, NULL, fname, NULL);
388 if (elf_end (elf) != 0)
398 if (elf_end (elf) != 0)
409 handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
435 Elf_Arsym *arsym = elf_getarsym (elf, NULL);
447 && (elf_rand (elf, arsym->as_off) != arsym->as_off
448 || (subelf = elf_begin (fd, cmd, elf)) == NULL
461 if (elf_rand (elf, SARMAG) != SARMAG)
471 while ((subelf = elf_begin (fd, cmd, elf)) != NULL)
712 sym_name (Elf *elf, GElf_Word strndx, GElf_Word st_name, char buf[], size_t n)
714 const char *symstr = elf_strptr (elf, strndx, st_name);
730 if (elf_getshdrnum (ebl->elf, &shnum) < 0)
741 if (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0)
747 while ((scn = elf_nextscn (ebl->elf, scn)) != NULL)
758 name = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
764 int digits = length_map[gelf_getclass (ebl->elf) - 1][radix];
793 const char *symstr = sym_name (ebl->elf, strndx, syms[cnt].sym.st_name,
879 class_type_char (Elf *elf, const GElf_Ehdr *ehdr, GElf_Sym *sym)
906 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (elf, sym->st_shndx),
928 show_symbols_bsd (Elf *elf, const GElf_Ehdr *ehdr, GElf_Word strndx,
932 int digits = length_map[gelf_getclass (elf) - 1][radix];
946 const char *symstr = sym_name (elf, strndx, syms[cnt].sym.st_name,
1019 class_type_char (elf, ehdr, &syms[cnt].sym), marker,
1037 class_type_char (elf, ehdr, &syms[cnt].sym), marker,
1060 show_symbols_posix (Elf *elf, const GElf_Ehdr *ehdr, GElf_Word strndx,
1067 int digits = length_map[gelf_getclass (elf) - 1][radix];
1078 const char *symstr = sym_name (elf, strndx, syms[cnt].sym.st_name,
1113 class_type_char (elf, ehdr, &syms[cnt].sym),
1189 elf file but is only missing the alternate debug link. If dwbias
1191 for the main elf. We don't care in that case. */
1233 if (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0)
1243 || entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT))
1247 elf_strptr (ebl->elf, shstrndx, shdr->sh_name));
1252 elf_strptr (ebl->elf, shstrndx, shdr->sh_name));
1270 dbg = dwarf_begin_elf (ebl->elf, DWARF_C_READ, NULL);
1332 elf_strptr (ebl->elf, shstrndx, shdr->sh_name));
1365 const char *symstr = elf_strptr (ebl->elf, shdr->sh_link,
1477 sort_by_name_elf = ebl->elf;
1493 show_symbols_bsd (ebl->elf, ehdr, shdr->sh_link, prefix, fname, fullname,
1500 show_symbols_posix (ebl->elf, ehdr, shdr->sh_link, prefix, fullname,
1528 handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
1551 ebl = ebl_openbackend (elf);
1556 ehdr = gelf_getehdr (elf, &ehdr_mem);
1575 while ((scn = elf_nextscn (elf, scn)) != NULL)
1595 while ((xndxscn = elf_nextscn (elf, xndxscn)) != NULL)