Lines Matching refs:sym

260 	sym_entry_t *sym;  in construct_symtab()  local
299 for (i = 0, sym = p_symtab; i < tgt->dt_symcount; i++) { in construct_symtab()
300 if (gelf_getsym(symdata, i, &(sym->se_sym)) == NULL) { in construct_symtab()
310 if (!IS_DATA_TYPE(GELF_ST_TYPE(sym->se_sym.st_info))) { in construct_symtab()
315 if (sym->se_sym.st_shndx == SHN_XINDEX && symshndx != NULL) { in construct_symtab()
319 sym->se_shndx = -1; in construct_symtab()
321 sym->se_shndx = symshndx[i]; in construct_symtab()
324 sym->se_shndx = sym->se_sym.st_shndx; in construct_symtab()
328 if (sym->se_shndx == SHN_ABS) { in construct_symtab()
335 if (sym->se_sym.st_value == 0) { in construct_symtab()
353 sym++; in construct_symtab()
362 if (sym->se_shndx == SHN_UNDEF || in construct_symtab()
363 sym->se_shndx >= SHN_LORESERVE) { in construct_symtab()
368 if ((sym->se_name = elf_strptr(tgt->dt_elf, shdr.sh_link, in construct_symtab()
369 (size_t)sym->se_sym.st_name)) == NULL) { in construct_symtab()
380 if (tgt->dt_shnmap[sym->se_shndx].dm_mapped) in construct_symtab()
381 sym->se_sym.st_value += in construct_symtab()
382 tgt->dt_shnmap[sym->se_shndx].dm_start; in construct_symtab()
384 sym++; in construct_symtab()
662 sym_entry_t *sym, *osym, *match; in dis_tgt_lookup() local
674 sym = tgt->dt_symcache; in dis_tgt_lookup()
675 *offset = addr - sym->se_sym.st_value; in dis_tgt_lookup()
676 *size = sym->se_sym.st_size; in dis_tgt_lookup()
678 *isfunc = (GELF_ST_TYPE(sym->se_sym.st_info) == in dis_tgt_lookup()
680 return (sym->se_name); in dis_tgt_lookup()
690 sym = &tgt->dt_symtab[mid]; in dis_tgt_lookup()
692 if (addr >= sym->se_sym.st_value && in dis_tgt_lookup()
693 addr < sym->se_sym.st_value + sym->se_sym.st_size && in dis_tgt_lookup()
694 (!found || sym->se_sym.st_value > osym->se_sym.st_value)) { in dis_tgt_lookup()
695 osym = sym; in dis_tgt_lookup()
697 } else if (addr == sym->se_sym.st_value) { in dis_tgt_lookup()
703 match = sym; in dis_tgt_lookup()
706 if (addr < sym->se_sym.st_value) in dis_tgt_lookup()
723 sym = osym; in dis_tgt_lookup()
729 } while ((sym->se_sym.st_value == osym->se_sym.st_value) && in dis_tgt_lookup()
734 tgt->dt_symcache = sym; in dis_tgt_lookup()
736 *offset = addr - sym->se_sym.st_value; in dis_tgt_lookup()
737 *size = sym->se_sym.st_size; in dis_tgt_lookup()
739 *isfunc = (GELF_ST_TYPE(sym->se_sym.st_info) == STT_FUNC); in dis_tgt_lookup()
741 return (sym->se_name); in dis_tgt_lookup()
751 sym_entry_t *sym; in dis_tgt_next_symbol() local
753 sym = (tgt->dt_symcache != NULL) ? tgt->dt_symcache : tgt->dt_symtab; in dis_tgt_next_symbol()
755 while (sym != (tgt->dt_symtab + tgt->dt_symcount)) { in dis_tgt_next_symbol()
756 if (sym->se_sym.st_value >= addr) in dis_tgt_next_symbol()
757 return (sym->se_sym.st_value - addr); in dis_tgt_next_symbol()
758 sym++; in dis_tgt_next_symbol()
887 sym_entry_t *sym; in dis_tgt_function_iter() local
892 for (i = 0, sym = tgt->dt_symtab; i < tgt->dt_symcount; i++, sym++) { in dis_tgt_function_iter()
895 if ((GELF_ST_TYPE(sym->se_sym.st_info) != STT_FUNC) || in dis_tgt_function_iter()
896 (sym->se_name == NULL) || in dis_tgt_function_iter()
897 (sym->se_sym.st_size == 0) || in dis_tgt_function_iter()
898 (sym->se_shndx >= SHN_LORESERVE)) in dis_tgt_function_iter()
902 if ((scn = elf_getscn(tgt->dt_elf, sym->se_shndx)) == NULL || in dis_tgt_function_iter()
907 tgt->dt_filename, sym->se_shndx); in dis_tgt_function_iter()
911 if (tgt->dt_shnmap[sym->se_shndx].dm_mapped) in dis_tgt_function_iter()
912 shdr.sh_addr = tgt->dt_shnmap[sym->se_shndx].dm_start; in dis_tgt_function_iter()
918 if (sym->se_sym.st_value < shdr.sh_addr || in dis_tgt_function_iter()
919 (sym->se_sym.st_value + sym->se_sym.st_size) > in dis_tgt_function_iter()
922 tgt->dt_filename, sym->se_sym.st_shndx, in dis_tgt_function_iter()
923 sym->se_sym.st_value); in dis_tgt_function_iter()
927 df.df_sym = sym; in dis_tgt_function_iter()
928 df.df_offset = sym->se_sym.st_value - shdr.sh_addr; in dis_tgt_function_iter()