Lines Matching full:ed

86 #define	PRT(...)	fprintf(ed->out, __VA_ARGS__)
371 sh_name(struct elfdump *ed, int ndx) in sh_name() argument
380 if ((uint64_t)ndx < ed->shnum) in sh_name()
381 return (ed->sl[ndx].name); in sh_name()
592 static void add_name(struct elfdump *ed, const char *name);
593 static void elf_print_object(struct elfdump *ed);
594 static void elf_print_elf(struct elfdump *ed);
595 static void elf_print_ehdr(struct elfdump *ed);
596 static void elf_print_phdr(struct elfdump *ed);
597 static void elf_print_shdr(struct elfdump *ed);
598 static void elf_print_symtab(struct elfdump *ed, int i);
599 static void elf_print_symtabs(struct elfdump *ed);
600 static void elf_print_symver(struct elfdump *ed);
601 static void elf_print_verdef(struct elfdump *ed, struct section *s);
602 static void elf_print_verneed(struct elfdump *ed, struct section *s);
603 static void elf_print_interp(struct elfdump *ed);
604 static void elf_print_dynamic(struct elfdump *ed);
605 static void elf_print_rel_entry(struct elfdump *ed, struct section *s,
607 static void elf_print_rela(struct elfdump *ed, struct section *s,
609 static void elf_print_rel(struct elfdump *ed, struct section *s,
611 static void elf_print_reloc(struct elfdump *ed);
612 static void elf_print_got(struct elfdump *ed);
613 static void elf_print_got_section(struct elfdump *ed, struct section *s);
614 static void elf_print_note(struct elfdump *ed);
615 static void elf_print_svr4_hash(struct elfdump *ed, struct section *s);
616 static void elf_print_svr4_hash64(struct elfdump *ed, struct section *s);
617 static void elf_print_gnu_hash(struct elfdump *ed, struct section *s);
618 static void elf_print_hash(struct elfdump *ed);
619 static void elf_print_checksum(struct elfdump *ed);
620 static void find_gotrel(struct elfdump *ed, struct section *gs,
622 static struct spec_name *find_name(struct elfdump *ed, const char *name);
624 static const char *get_symbol_name(struct elfdump *ed, uint32_t symtab, int i);
625 static const char *get_string(struct elfdump *ed, int strtab, size_t off);
626 static void get_versym(struct elfdump *ed, int i, uint16_t **vs, int *nvs);
627 static void load_sections(struct elfdump *ed);
628 static void unload_sections(struct elfdump *ed);
632 static void ac_print_ar(struct elfdump *ed, int fd);
634 static void elf_print_ar(struct elfdump *ed, int fd);
647 struct elfdump *ed, ed_storage; in main() local
651 ed = &ed_storage; in main()
652 memset(ed, 0, sizeof(*ed)); in main()
653 STAILQ_INIT(&ed->snl); in main()
654 ed->out = stdout; in main()
659 ed->options = ED_ALL; in main()
662 ed->options |= ED_SHDR; in main()
665 ed->options |= ED_DYN; in main()
668 ed->options |= ED_EHDR; in main()
671 ed->options |= ED_INTERP; in main()
674 ed->options |= ED_GOT; in main()
677 ed->options |= ED_HASH; in main()
680 ed->options |= ED_CHECKSUM; in main()
683 ed->options |= ED_NOTE; in main()
686 add_name(ed, optarg); in main()
689 ed->options |= ED_PHDR; in main()
692 ed->options |= ED_REL; in main()
695 ed->options |= ED_SYMTAB; in main()
698 ed->flags |= SOLARIS_FMT; in main()
701 ed->options |= ED_SYMVER; in main()
709 if ((ed->out = fopen(optarg, "w")) == NULL) in main()
721 if (ed->options == 0) in main()
722 ed->options = ED_ALL; in main()
724 if (ed->options & ED_SYMTAB && in main()
725 (STAILQ_EMPTY(&ed->snl) || (sn = find_name(ed, "ARSYM")) != NULL)) { in main()
726 ed->flags |= PRINT_ARSYM; in main()
728 STAILQ_REMOVE(&ed->snl, sn, spec_name, sn_list); in main()
729 if (STAILQ_EMPTY(&ed->snl)) in main()
730 ed->flags |= ONLY_ARSYM; in main()
736 ed->flags |= PRINT_FILENAME; in main()
742 ed->filename = av[i]; in main()
743 ed->archive = NULL; in main()
744 elf_print_object(ed); in main()
794 ac_print_ar(struct elfdump *ed, int fd) in ac_print_ar() argument
842 if (!strcmp(name, "/") && ed->flags & PRINT_ARSYM) { in ac_print_ar()
861 if (ed->flags & SOLARIS_FMT) { in ac_print_ar()
867 if (ed->flags & SOLARIS_FMT) { in ac_print_ar()
884 if (ed->flags & ONLY_ARSYM) { in ac_print_ar()
891 if ((ed->elf = elf_memory(buff, size)) == NULL) { in ac_print_ar()
898 if (elf_kind(ed->elf) == ELF_K_ELF) { in ac_print_ar()
899 printf("\n%s(%s):\n", ed->archive, name); in ac_print_ar()
900 elf_print_elf(ed); in ac_print_ar()
902 elf_end(ed->elf); in ac_print_ar()
915 elf_print_ar(struct elfdump *ed, int fd) in elf_print_ar() argument
924 ed->ar = ed->elf; in elf_print_ar()
926 if (ed->flags & PRINT_ARSYM) { in elf_print_ar()
928 if ((arsym = elf_getarsym(ed->ar, &cnt)) == NULL) { in elf_print_ar()
934 if (ed->flags & SOLARIS_FMT) { in elf_print_ar()
940 if (elf_rand(ed->ar, arsym[i].as_off) != in elf_print_ar()
945 if ((e = elf_begin(fd, ELF_C_READ, ed->ar)) == NULL) { in elf_print_ar()
954 if (ed->flags & SOLARIS_FMT) { in elf_print_ar()
972 if (ed->flags & ONLY_ARSYM) in elf_print_ar()
979 if (elf_rand(ed->ar, SARMAG) != SARMAG) { in elf_print_ar()
986 while ((ed->elf = elf_begin(fd, cmd, ed->ar)) != NULL) { in elf_print_ar()
988 if (elf_kind(ed->elf) == ELF_K_ELF) { in elf_print_ar()
989 if ((arh = elf_getarhdr(ed->elf)) == NULL) { in elf_print_ar()
994 printf("\n%s(%s):\n", ed->archive, arh->ar_name); in elf_print_ar()
995 elf_print_elf(ed); in elf_print_ar()
997 cmd = elf_next(ed->elf); in elf_print_ar()
998 elf_end(ed->elf); in elf_print_ar()
1008 elf_print_object(struct elfdump *ed) in elf_print_object() argument
1012 if ((fd = open(ed->filename, O_RDONLY)) == -1) { in elf_print_object()
1013 warn("open %s failed", ed->filename); in elf_print_object()
1019 ed->archive = ed->filename; in elf_print_object()
1020 ac_print_ar(ed, fd); in elf_print_object()
1025 if ((ed->elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { in elf_print_object()
1030 switch (elf_kind(ed->elf)) { in elf_print_object()
1035 if (ed->flags & PRINT_FILENAME) in elf_print_object()
1036 printf("\n%s:\n", ed->filename); in elf_print_object()
1037 elf_print_elf(ed); in elf_print_object()
1041 ed->archive = ed->filename; in elf_print_object()
1042 elf_print_ar(ed, fd); in elf_print_object()
1050 elf_end(ed->elf); in elf_print_object()
1057 elf_print_elf(struct elfdump *ed) in elf_print_elf() argument
1060 if (gelf_getehdr(ed->elf, &ed->ehdr) == NULL) { in elf_print_elf()
1064 if ((ed->ec = gelf_getclass(ed->elf)) == ELFCLASSNONE) { in elf_print_elf()
1069 if (ed->options & (ED_SHDR | ED_DYN | ED_REL | ED_GOT | ED_SYMTAB | in elf_print_elf()
1071 load_sections(ed); in elf_print_elf()
1073 if (ed->options & ED_EHDR) in elf_print_elf()
1074 elf_print_ehdr(ed); in elf_print_elf()
1075 if (ed->options & ED_PHDR) in elf_print_elf()
1076 elf_print_phdr(ed); in elf_print_elf()
1077 if (ed->options & ED_INTERP) in elf_print_elf()
1078 elf_print_interp(ed); in elf_print_elf()
1079 if (ed->options & ED_SHDR) in elf_print_elf()
1080 elf_print_shdr(ed); in elf_print_elf()
1081 if (ed->options & ED_DYN) in elf_print_elf()
1082 elf_print_dynamic(ed); in elf_print_elf()
1083 if (ed->options & ED_REL) in elf_print_elf()
1084 elf_print_reloc(ed); in elf_print_elf()
1085 if (ed->options & ED_GOT) in elf_print_elf()
1086 elf_print_got(ed); in elf_print_elf()
1087 if (ed->options & ED_SYMTAB) in elf_print_elf()
1088 elf_print_symtabs(ed); in elf_print_elf()
1089 if (ed->options & ED_SYMVER) in elf_print_elf()
1090 elf_print_symver(ed); in elf_print_elf()
1091 if (ed->options & ED_NOTE) in elf_print_elf()
1092 elf_print_note(ed); in elf_print_elf()
1093 if (ed->options & ED_HASH) in elf_print_elf()
1094 elf_print_hash(ed); in elf_print_elf()
1095 if (ed->options & ED_CHECKSUM) in elf_print_elf()
1096 elf_print_checksum(ed); in elf_print_elf()
1098 unload_sections(ed); in elf_print_elf()
1106 load_sections(struct elfdump *ed) in load_sections() argument
1115 assert(ed->sl == NULL); in load_sections()
1117 if (!elf_getshnum(ed->elf, &ed->shnum)) { in load_sections()
1121 if (ed->shnum == 0) in load_sections()
1123 if ((ed->sl = calloc(ed->shnum, sizeof(*ed->sl))) == NULL) in load_sections()
1125 if (!elf_getshstrndx(ed->elf, &shstrndx)) { in load_sections()
1129 if ((scn = elf_getscn(ed->elf, 0)) == NULL) { in load_sections()
1140 if ((name = elf_strptr(ed->elf, shstrndx, sh.sh_name)) == NULL) { in load_sections()
1150 if (ndx >= ed->shnum) { in load_sections()
1154 s = &ed->sl[ndx]; in load_sections()
1166 } while ((scn = elf_nextscn(ed->elf, scn)) != NULL); in load_sections()
1176 unload_sections(struct elfdump *ed) in unload_sections() argument
1178 if (ed->sl != NULL) { in unload_sections()
1179 free(ed->sl); in unload_sections()
1180 ed->sl = NULL; in unload_sections()
1188 add_name(struct elfdump *ed, const char *name) in add_name() argument
1192 if (find_name(ed, name)) in add_name()
1199 STAILQ_INSERT_TAIL(&ed->snl, sn, sn_list); in add_name()
1206 find_name(struct elfdump *ed, const char *name) in find_name() argument
1210 STAILQ_FOREACH(sn, &ed->snl, sn_list) { in find_name()
1223 get_symbol_name(struct elfdump *ed, uint32_t symtab, int i) in get_symbol_name() argument
1232 if (symtab >= ed->shnum) in get_symbol_name()
1234 s = &ed->sl[symtab]; in get_symbol_name()
1247 if (sym.st_shndx < ed->shnum) { in get_symbol_name()
1249 ed->sl[sym.st_shndx].name); in get_symbol_name()
1254 if ((name = elf_strptr(ed->elf, s->link, sym.st_name)) == NULL) in get_symbol_name()
1264 get_string(struct elfdump *ed, int strtab, size_t off) in get_string() argument
1268 if ((name = elf_strptr(ed->elf, strtab, off)) == NULL) in get_string()
1278 elf_print_ehdr(struct elfdump *ed) in elf_print_ehdr() argument
1281 if (!STAILQ_EMPTY(&ed->snl)) in elf_print_ehdr()
1284 if (ed->flags & SOLARIS_FMT) { in elf_print_ehdr()
1287 ed->ehdr.e_ident[0], ed->ehdr.e_ident[1], in elf_print_ehdr()
1288 ed->ehdr.e_ident[2], ed->ehdr.e_ident[3]); in elf_print_ehdr()
1290 elf_class_str(ed->ehdr.e_ident[EI_CLASS])); in elf_print_ehdr()
1292 elf_data_str(ed->ehdr.e_ident[EI_DATA])); in elf_print_ehdr()
1293 PRT(" e_machine: %-18s", e_machines(ed->ehdr.e_machine)); in elf_print_ehdr()
1295 elf_version_str(ed->ehdr.e_version)); in elf_print_ehdr()
1296 PRT(" e_type: %s\n", elf_type_str(ed->ehdr.e_type)); in elf_print_ehdr()
1297 PRT(" e_flags: %18d\n", ed->ehdr.e_flags); in elf_print_ehdr()
1298 PRT(" e_entry: %#18jx", (uintmax_t)ed->ehdr.e_entry); in elf_print_ehdr()
1299 PRT(" e_ehsize: %6d", ed->ehdr.e_ehsize); in elf_print_ehdr()
1300 PRT(" e_shstrndx:%5d\n", ed->ehdr.e_shstrndx); in elf_print_ehdr()
1301 PRT(" e_shoff: %#18jx", (uintmax_t)ed->ehdr.e_shoff); in elf_print_ehdr()
1302 PRT(" e_shentsize: %3d", ed->ehdr.e_shentsize); in elf_print_ehdr()
1303 PRT(" e_shnum: %5d\n", ed->ehdr.e_shnum); in elf_print_ehdr()
1304 PRT(" e_phoff: %#18jx", (uintmax_t)ed->ehdr.e_phoff); in elf_print_ehdr()
1305 PRT(" e_phentsize: %3d", ed->ehdr.e_phentsize); in elf_print_ehdr()
1306 PRT(" e_phnum: %5d\n", ed->ehdr.e_phnum); in elf_print_ehdr()
1311 elf_class_str(ed->ehdr.e_ident[EI_CLASS]), in elf_print_ehdr()
1312 elf_data_str(ed->ehdr.e_ident[EI_DATA]), in elf_print_ehdr()
1313 ei_abis[ed->ehdr.e_ident[EI_OSABI]]); in elf_print_ehdr()
1314 PRT("\te_type: %s\n", elf_type_str(ed->ehdr.e_type)); in elf_print_ehdr()
1315 PRT("\te_machine: %s\n", e_machines(ed->ehdr.e_machine)); in elf_print_ehdr()
1316 PRT("\te_version: %s\n", elf_version_str(ed->ehdr.e_version)); in elf_print_ehdr()
1317 PRT("\te_entry: %#jx\n", (uintmax_t)ed->ehdr.e_entry); in elf_print_ehdr()
1318 PRT("\te_phoff: %ju\n", (uintmax_t)ed->ehdr.e_phoff); in elf_print_ehdr()
1319 PRT("\te_shoff: %ju\n", (uintmax_t) ed->ehdr.e_shoff); in elf_print_ehdr()
1320 PRT("\te_flags: %u\n", ed->ehdr.e_flags); in elf_print_ehdr()
1321 PRT("\te_ehsize: %u\n", ed->ehdr.e_ehsize); in elf_print_ehdr()
1322 PRT("\te_phentsize: %u\n", ed->ehdr.e_phentsize); in elf_print_ehdr()
1323 PRT("\te_phnum: %u\n", ed->ehdr.e_phnum); in elf_print_ehdr()
1324 PRT("\te_shentsize: %u\n", ed->ehdr.e_shentsize); in elf_print_ehdr()
1325 PRT("\te_shnum: %u\n", ed->ehdr.e_shnum); in elf_print_ehdr()
1326 PRT("\te_shstrndx: %u\n", ed->ehdr.e_shstrndx); in elf_print_ehdr()
1334 elf_print_phdr(struct elfdump *ed) in elf_print_phdr() argument
1340 if (elf_getphnum(ed->elf, &phnum) == 0) { in elf_print_phdr()
1346 if (gelf_getphdr(ed->elf, i, &ph) != &ph) { in elf_print_phdr()
1350 if (!STAILQ_EMPTY(&ed->snl) && in elf_print_phdr()
1351 find_name(ed, elf_phdr_type_str(ph.p_type)) == NULL) in elf_print_phdr()
1353 if (ed->flags & SOLARIS_FMT) { in elf_print_phdr()
1390 elf_print_shdr(struct elfdump *ed) in elf_print_shdr() argument
1395 if (!STAILQ_EMPTY(&ed->snl)) in elf_print_shdr()
1398 if ((ed->flags & SOLARIS_FMT) == 0) in elf_print_shdr()
1400 for (i = 0; i < ed->shnum; i++) { in elf_print_shdr()
1401 s = &ed->sl[i]; in elf_print_shdr()
1402 if (ed->flags & SOLARIS_FMT) { in elf_print_shdr()
1414 sh_types(ed->ehdr.e_machine, s->type)); in elf_print_shdr()
1425 sh_types(ed->ehdr.e_machine, s->type)); in elf_print_shdr()
1461 get_versym(struct elfdump *ed, int i, uint16_t **vs, int *nvs) in get_versym() argument
1469 for (j = 0; j < ed->shnum; j++) { in get_versym()
1470 s = &ed->sl[j]; in get_versym()
1474 if (j >= ed->shnum) { in get_versym()
1497 elf_print_symtab(struct elfdump *ed, int i) in elf_print_symtab() argument
1507 s = &ed->sl[i]; in elf_print_symtab()
1508 if (ed->flags & SOLARIS_FMT) in elf_print_symtab()
1524 if (ed->flags & SOLARIS_FMT) { in elf_print_symtab()
1525 if (ed->ec == ELFCLASS32) in elf_print_symtab()
1530 get_versym(ed, i, &vs, &nvs); in elf_print_symtab()
1541 name = get_string(ed, s->link, sym.st_name); in elf_print_symtab()
1542 if (ed->flags & SOLARIS_FMT) { in elf_print_symtab()
1544 if (ed->ec == ELFCLASS32) in elf_print_symtab()
1549 if (ed->ec == ELFCLASS32) in elf_print_symtab()
1557 PRT("%-11.11s ", sh_name(ed, sym.st_shndx)); in elf_print_symtab()
1565 st_type(ed->ehdr.e_machine, in elf_print_symtab()
1577 elf_print_symtabs(struct elfdump *ed) in elf_print_symtabs() argument
1581 for (i = 0; i < ed->shnum; i++) in elf_print_symtabs()
1582 if ((ed->sl[i].type == SHT_SYMTAB || in elf_print_symtabs()
1583 ed->sl[i].type == SHT_DYNSYM) && in elf_print_symtabs()
1584 (STAILQ_EMPTY(&ed->snl) || find_name(ed, ed->sl[i].name))) in elf_print_symtabs()
1585 elf_print_symtab(ed, i); in elf_print_symtabs()
1592 elf_print_dynamic(struct elfdump *ed) in elf_print_dynamic() argument
1602 for (i = 0; (size_t)i < ed->shnum; i++) { in elf_print_dynamic()
1603 s = &ed->sl[i]; in elf_print_dynamic()
1605 (STAILQ_EMPTY(&ed->snl) || find_name(ed, s->name))) in elf_print_dynamic()
1608 if ((size_t)i >= ed->shnum) in elf_print_dynamic()
1611 if (ed->flags & SOLARIS_FMT) { in elf_print_dynamic()
1632 if (ed->flags & SOLARIS_FMT) { in elf_print_dynamic()
1645 if ((name = elf_strptr(ed->elf, s->link, in elf_print_dynamic()
1648 if (ed->flags & SOLARIS_FMT) in elf_print_dynamic()
1669 if (ed->flags & SOLARIS_FMT) in elf_print_dynamic()
1685 if (ed->flags & SOLARIS_FMT) in elf_print_dynamic()
1695 if (ed->flags & SOLARIS_FMT) in elf_print_dynamic()
1706 elf_print_rel_entry(struct elfdump *ed, struct section *s, int j, in elf_print_rel_entry() argument
1710 if (ed->flags & SOLARIS_FMT) { in elf_print_rel_entry()
1711 PRT(" %-23s ", elftc_reloc_type_str(ed->ehdr.e_machine, in elf_print_rel_entry()
1724 if (ed->ec == ELFCLASS32) in elf_print_rel_entry()
1740 elf_print_rela(struct elfdump *ed, struct section *s, Elf_Data *data) in elf_print_rela() argument
1745 if (ed->flags & SOLARIS_FMT) { in elf_print_rela()
1761 r.symn = get_symbol_name(ed, s->link, in elf_print_rela()
1763 elf_print_rel_entry(ed, s, j, &r); in elf_print_rela()
1771 elf_print_rel(struct elfdump *ed, struct section *s, Elf_Data *data) in elf_print_rel() argument
1776 if (ed->flags & SOLARIS_FMT) { in elf_print_rel()
1791 r.symn = get_symbol_name(ed, s->link, in elf_print_rel()
1793 elf_print_rel_entry(ed, s, j, &r); in elf_print_rel()
1801 elf_print_reloc(struct elfdump *ed) in elf_print_reloc() argument
1808 for (i = 0; i < ed->shnum; i++) { in elf_print_reloc()
1809 s = &ed->sl[i]; in elf_print_reloc()
1811 (STAILQ_EMPTY(&ed->snl) || find_name(ed, s->name))) { in elf_print_reloc()
1821 elf_print_rel(ed, s, data); in elf_print_reloc()
1823 elf_print_rela(ed, s, data); in elf_print_reloc()
1832 elf_print_interp(struct elfdump *ed) in elf_print_interp() argument
1838 if (!STAILQ_EMPTY(&ed->snl) && find_name(ed, "PT_INTERP") == NULL) in elf_print_interp()
1841 if ((s = elf_rawfile(ed->elf, &filesize)) == NULL) { in elf_print_interp()
1845 if (!elf_getphnum(ed->elf, &phnum)) { in elf_print_interp()
1850 if (gelf_getphdr(ed->elf, i, &phdr) != &phdr) { in elf_print_interp()
1869 find_gotrel(struct elfdump *ed, struct section *gs, struct rel_entry *got) in find_gotrel() argument
1877 for(i = 0; i < ed->shnum; i++) { in find_gotrel()
1878 s = &ed->sl[i]; in find_gotrel()
1912 r.symn = get_symbol_name(ed, s->link, in find_gotrel()
1923 elf_print_got_section(struct elfdump *ed, struct section *s) in elf_print_got_section() argument
1939 if (ed->flags & SOLARIS_FMT) in elf_print_got_section()
1958 if (ed->ec == ELFCLASS32) in elf_print_got_section()
1963 if (gelf_xlatetom(ed->elf, &dst, data, ed->ehdr.e_ident[EI_DATA]) != in elf_print_got_section()
1969 if (ed->flags & SOLARIS_FMT) { in elf_print_got_section()
1977 find_gotrel(ed, s, got); in elf_print_got_section()
1978 if (ed->ec == ELFCLASS32) { in elf_print_got_section()
1987 if (ed->ec == ELFCLASS32) { in elf_print_got_section()
1997 PRT("%-18s ", elftc_reloc_type_str(ed->ehdr.e_machine, in elf_print_got_section()
1999 if (ed->ec == ELFCLASS32) in elf_print_got_section()
2013 if (ed->ec == ELFCLASS32) in elf_print_got_section()
2026 elf_print_got(struct elfdump *ed) in elf_print_got() argument
2031 if (!STAILQ_EMPTY(&ed->snl)) in elf_print_got()
2035 for (i = 0; i < ed->shnum; i++) { in elf_print_got()
2036 s = &ed->sl[i]; in elf_print_got()
2038 (STAILQ_EMPTY(&ed->snl) || find_name(ed, s->name))) in elf_print_got()
2039 elf_print_got_section(ed, s); in elf_print_got()
2047 elf_print_note(struct elfdump *ed) in elf_print_note() argument
2061 for (i = 0; (size_t)i < ed->shnum; i++) { in elf_print_note()
2062 s = &ed->sl[i]; in elf_print_note()
2065 (STAILQ_EMPTY(&ed->snl) || find_name(ed, s->name))) in elf_print_note()
2068 if ((size_t)i >= ed->shnum) in elf_print_note()
2070 if (ed->flags & SOLARIS_FMT) in elf_print_note()
2093 if (ed->flags & SOLARIS_FMT) { in elf_print_note()
2108 if (ed->flags & SOLARIS_FMT) { in elf_print_note()
2121 if (ed->ehdr.e_ident[EI_DATA] == ELFDATA2MSB) in elf_print_note()
2136 elf_print_svr4_hash(struct elfdump *ed, struct section *s) in elf_print_svr4_hash() argument
2147 if (ed->flags & SOLARIS_FMT) in elf_print_svr4_hash()
2178 if (ed->flags & SOLARIS_FMT) { in elf_print_svr4_hash()
2201 PRT("%s\n", get_symbol_name(ed, s->link, j)); in elf_print_svr4_hash()
2226 elf_print_svr4_hash64(struct elfdump *ed, struct section *s) in elf_print_svr4_hash64() argument
2237 if (ed->flags & SOLARIS_FMT) in elf_print_svr4_hash64()
2257 if (gelf_xlatetom(ed->elf, &dst, data, in elf_print_svr4_hash64()
2258 ed->ehdr.e_ident[EI_DATA]) != &dst) { in elf_print_svr4_hash64()
2280 if (ed->flags & SOLARIS_FMT) { in elf_print_svr4_hash64()
2303 PRT("%s\n", get_symbol_name(ed, s->link, j)); in elf_print_svr4_hash64()
2330 elf_print_gnu_hash(struct elfdump *ed, struct section *s) in elf_print_gnu_hash() argument
2342 if (ed->flags & SOLARIS_FMT) in elf_print_gnu_hash()
2364 if (s->link >= ed->shnum) { in elf_print_gnu_hash()
2368 ds = &ed->sl[s->link]; in elf_print_gnu_hash()
2377 (ed->ec == ELFCLASS32 ? sizeof(uint32_t) : sizeof(uint64_t)) + in elf_print_gnu_hash()
2382 bucket = buf + (ed->ec == ELFCLASS32 ? maskwords : maskwords * 2); in elf_print_gnu_hash()
2385 if (ed->flags & SOLARIS_FMT) { in elf_print_gnu_hash()
2411 PRT("%s\n", get_symbol_name(ed, s->link, j)); in elf_print_gnu_hash()
2441 elf_print_hash(struct elfdump *ed) in elf_print_hash() argument
2446 for (i = 0; i < ed->shnum; i++) { in elf_print_hash()
2447 s = &ed->sl[i]; in elf_print_hash()
2449 (STAILQ_EMPTY(&ed->snl) || find_name(ed, s->name))) { in elf_print_hash()
2451 elf_print_gnu_hash(ed, s); in elf_print_hash()
2452 else if (ed->ehdr.e_machine == EM_ALPHA && in elf_print_hash()
2454 elf_print_svr4_hash64(ed, s); in elf_print_hash()
2456 elf_print_svr4_hash(ed, s); in elf_print_hash()
2465 elf_print_verdef(struct elfdump *ed, struct section *s) in elf_print_verdef() argument
2475 if (ed->flags & SOLARIS_FMT) in elf_print_verdef()
2490 if (ed->flags & SOLARIS_FMT) in elf_print_verdef()
2494 if (ed->flags & SOLARIS_FMT) { in elf_print_verdef()
2512 str = get_string(ed, s->link, vda->vda_name); in elf_print_verdef()
2513 if (ed->flags & SOLARIS_FMT) { in elf_print_verdef()
2528 if (ed->flags & SOLARIS_FMT) { in elf_print_verdef()
2538 if (ed->flags & SOLARIS_FMT) in elf_print_verdef()
2552 elf_print_verneed(struct elfdump *ed, struct section *s) in elf_print_verneed() argument
2560 if (ed->flags & SOLARIS_FMT) in elf_print_verneed()
2574 if (ed->flags & SOLARIS_FMT) in elf_print_verneed()
2579 if (ed->flags & SOLARIS_FMT) in elf_print_verneed()
2581 get_string(ed, s->link, vn->vn_file)); in elf_print_verneed()
2587 get_string(ed, s->link, vn->vn_file)); in elf_print_verneed()
2596 if (ed->flags & SOLARIS_FMT) { in elf_print_verneed()
2601 PRT("%s\n", get_string(ed, s->link, in elf_print_verneed()
2609 get_string(ed, s->link, vna->vna_name)); in elf_print_verneed()
2626 elf_print_symver(struct elfdump *ed) in elf_print_symver() argument
2631 for (i = 0; i < ed->shnum; i++) { in elf_print_symver()
2632 s = &ed->sl[i]; in elf_print_symver()
2633 if (!STAILQ_EMPTY(&ed->snl) && !find_name(ed, s->name)) in elf_print_symver()
2636 elf_print_verdef(ed, s); in elf_print_symver()
2638 elf_print_verneed(ed, s); in elf_print_symver()
2646 elf_print_checksum(struct elfdump *ed) in elf_print_checksum() argument
2649 if (!STAILQ_EMPTY(&ed->snl)) in elf_print_checksum()
2652 PRT("\nelf checksum: %#lx\n", gelf_checksum(ed->elf)); in elf_print_checksum()