Lines Matching refs:sym

245 	sym_entry_t *sym;  in construct_symtab()  local
284 for (i = 0, sym = p_symtab; i < tgt->dt_symcount; i++) { in construct_symtab()
285 if (gelf_getsym(symdata, i, &(sym->se_sym)) == NULL) { in construct_symtab()
295 if (!IS_DATA_TYPE(GELF_ST_TYPE(sym->se_sym.st_info))) { in construct_symtab()
300 if (sym->se_sym.st_shndx == SHN_XINDEX && symshndx != NULL) { in construct_symtab()
304 sym->se_shndx = -1; in construct_symtab()
306 sym->se_shndx = symshndx[i]; in construct_symtab()
309 sym->se_shndx = sym->se_sym.st_shndx; in construct_symtab()
313 if (sym->se_shndx == SHN_ABS) { in construct_symtab()
320 if (sym->se_sym.st_value == 0) { in construct_symtab()
338 sym++; in construct_symtab()
347 if (sym->se_shndx == SHN_UNDEF || in construct_symtab()
348 sym->se_shndx >= SHN_LORESERVE) { in construct_symtab()
353 if ((sym->se_name = elf_strptr(tgt->dt_elf, shdr.sh_link, in construct_symtab()
354 (size_t)sym->se_sym.st_name)) == NULL) { in construct_symtab()
365 if (tgt->dt_shnmap[sym->se_shndx].dm_mapped) in construct_symtab()
366 sym->se_sym.st_value += in construct_symtab()
367 tgt->dt_shnmap[sym->se_shndx].dm_start; in construct_symtab()
369 sym++; in construct_symtab()
647 sym_entry_t *sym, *osym, *match; in dis_tgt_lookup() local
659 sym = tgt->dt_symcache; in dis_tgt_lookup()
660 *offset = addr - sym->se_sym.st_value; in dis_tgt_lookup()
661 *size = sym->se_sym.st_size; in dis_tgt_lookup()
663 *isfunc = (GELF_ST_TYPE(sym->se_sym.st_info) == in dis_tgt_lookup()
665 return (sym->se_name); in dis_tgt_lookup()
675 sym = &tgt->dt_symtab[mid]; in dis_tgt_lookup()
677 if (addr >= sym->se_sym.st_value && in dis_tgt_lookup()
678 addr < sym->se_sym.st_value + sym->se_sym.st_size && in dis_tgt_lookup()
679 (!found || sym->se_sym.st_value > osym->se_sym.st_value)) { in dis_tgt_lookup()
680 osym = sym; in dis_tgt_lookup()
682 } else if (addr == sym->se_sym.st_value) { in dis_tgt_lookup()
688 match = sym; in dis_tgt_lookup()
691 if (addr < sym->se_sym.st_value) in dis_tgt_lookup()
708 sym = osym; in dis_tgt_lookup()
714 } while ((sym->se_sym.st_value == osym->se_sym.st_value) && in dis_tgt_lookup()
719 tgt->dt_symcache = sym; in dis_tgt_lookup()
721 *offset = addr - sym->se_sym.st_value; in dis_tgt_lookup()
722 *size = sym->se_sym.st_size; in dis_tgt_lookup()
724 *isfunc = (GELF_ST_TYPE(sym->se_sym.st_info) == STT_FUNC); in dis_tgt_lookup()
726 return (sym->se_name); in dis_tgt_lookup()
736 sym_entry_t *sym; in dis_tgt_next_symbol() local
738 sym = (tgt->dt_symcache != NULL) ? tgt->dt_symcache : tgt->dt_symtab; in dis_tgt_next_symbol()
740 while (sym != (tgt->dt_symtab + tgt->dt_symcount)) { in dis_tgt_next_symbol()
741 if (sym->se_sym.st_value >= addr) in dis_tgt_next_symbol()
742 return (sym->se_sym.st_value - addr); in dis_tgt_next_symbol()
743 sym++; in dis_tgt_next_symbol()
872 sym_entry_t *sym; in dis_tgt_function_iter() local
877 for (i = 0, sym = tgt->dt_symtab; i < tgt->dt_symcount; i++, sym++) { in dis_tgt_function_iter()
880 if ((GELF_ST_TYPE(sym->se_sym.st_info) != STT_FUNC) || in dis_tgt_function_iter()
881 (sym->se_name == NULL) || in dis_tgt_function_iter()
882 (sym->se_sym.st_size == 0) || in dis_tgt_function_iter()
883 (sym->se_shndx >= SHN_LORESERVE)) in dis_tgt_function_iter()
887 if ((scn = elf_getscn(tgt->dt_elf, sym->se_shndx)) == NULL || in dis_tgt_function_iter()
892 tgt->dt_filename, sym->se_shndx); in dis_tgt_function_iter()
896 if (tgt->dt_shnmap[sym->se_shndx].dm_mapped) in dis_tgt_function_iter()
897 shdr.sh_addr = tgt->dt_shnmap[sym->se_shndx].dm_start; in dis_tgt_function_iter()
903 if (sym->se_sym.st_value < shdr.sh_addr || in dis_tgt_function_iter()
904 (sym->se_sym.st_value + sym->se_sym.st_size) > in dis_tgt_function_iter()
907 tgt->dt_filename, sym->se_sym.st_shndx, in dis_tgt_function_iter()
908 sym->se_sym.st_value); in dis_tgt_function_iter()
912 df.df_sym = sym; in dis_tgt_function_iter()
913 df.df_offset = sym->se_sym.st_value - shdr.sh_addr; in dis_tgt_function_iter()