Lines Matching refs:scn
133 tgt_scn_init(dis_tgt_t *tgt, dis_scn_t *scn, void *data) in tgt_scn_init() argument
139 tgt->dt_shnmap[*index].dm_name = scn->ds_name; in tgt_scn_init()
140 tgt->dt_shnmap[*index].dm_start = scn->ds_shdr.sh_addr; in tgt_scn_init()
141 tgt->dt_shnmap[*index].dm_length = scn->ds_shdr.sh_size; in tgt_scn_init()
147 if (scn->ds_shdr.sh_type == SHT_DYNSYM && tgt->dt_symidx == 0) in tgt_scn_init()
149 else if (scn->ds_shdr.sh_type == SHT_SYMTAB) in tgt_scn_init()
239 Elf_Scn *scn; in construct_symtab() local
252 for (scn = elf_nextscn(tgt->dt_elf, NULL); scn != NULL; in construct_symtab()
253 scn = elf_nextscn(tgt->dt_elf, scn)) { in construct_symtab()
254 if (gelf_getshdr(scn, &shdr) == NULL) in construct_symtab()
260 if ((data = elf_getdata(scn, NULL)) != NULL) { in construct_symtab()
269 if ((scn = elf_getscn(tgt->dt_elf, tgt->dt_symidx)) == NULL) in construct_symtab()
271 if (gelf_getshdr(scn, &shdr) == NULL) in construct_symtab()
276 if ((symdata = elf_getdata(scn, NULL)) == NULL) in construct_symtab()
757 Elf_Scn *scn; in dis_tgt_section_iter() local
760 for (scn = elf_nextscn(tgt->dt_elf, NULL), idx = 1; scn != NULL; in dis_tgt_section_iter()
761 scn = elf_nextscn(tgt->dt_elf, scn), idx++) { in dis_tgt_section_iter()
763 if (gelf_getshdr(scn, &sdata.ds_shdr) == NULL) { in dis_tgt_section_iter()
776 if ((sdata.ds_data = elf_getdata(scn, NULL)) == NULL) { in dis_tgt_section_iter()
799 dis_section_istext(dis_scn_t *scn) in dis_section_istext() argument
801 return ((scn->ds_shdr.sh_type == SHT_PROGBITS) && in dis_section_istext()
802 (scn->ds_shdr.sh_flags == (SHF_ALLOC | SHF_EXECINSTR))); in dis_section_istext()
809 dis_section_data(dis_scn_t *scn) in dis_section_data() argument
811 return (scn->ds_data->d_buf); in dis_section_data()
818 dis_section_size(dis_scn_t *scn) in dis_section_size() argument
820 return (scn->ds_data->d_size); in dis_section_size()
827 dis_section_addr(dis_scn_t *scn) in dis_section_addr() argument
829 return (scn->ds_shdr.sh_addr); in dis_section_addr()
836 dis_section_name(dis_scn_t *scn) in dis_section_name() argument
838 return (scn->ds_name); in dis_section_name()
845 dis_section_copy(dis_scn_t *scn) in dis_section_copy() argument
850 (void) memcpy(new, scn, sizeof (dis_scn_t)); in dis_section_copy()
859 dis_section_free(dis_scn_t *scn) in dis_section_free() argument
861 free(scn); in dis_section_free()
874 Elf_Scn *scn; in dis_tgt_function_iter() local
887 if ((scn = elf_getscn(tgt->dt_elf, sym->se_shndx)) == NULL || in dis_tgt_function_iter()
888 gelf_getshdr(scn, &shdr) == NULL || in dis_tgt_function_iter()
889 (df.df_data = elf_getdata(scn, NULL)) == NULL || in dis_tgt_function_iter()