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()
254 Elf_Scn *scn; in construct_symtab() local
267 for (scn = elf_nextscn(tgt->dt_elf, NULL); scn != NULL; in construct_symtab()
268 scn = elf_nextscn(tgt->dt_elf, scn)) { in construct_symtab()
269 if (gelf_getshdr(scn, &shdr) == NULL) in construct_symtab()
275 if ((data = elf_getdata(scn, NULL)) != NULL) { in construct_symtab()
284 if ((scn = elf_getscn(tgt->dt_elf, tgt->dt_symidx)) == NULL) in construct_symtab()
286 if (gelf_getshdr(scn, &shdr) == NULL) in construct_symtab()
291 if ((symdata = elf_getdata(scn, NULL)) == NULL) in construct_symtab()
772 Elf_Scn *scn; in dis_tgt_section_iter() local
775 for (scn = elf_nextscn(tgt->dt_elf, NULL), idx = 1; scn != NULL; in dis_tgt_section_iter()
776 scn = elf_nextscn(tgt->dt_elf, scn), idx++) { in dis_tgt_section_iter()
778 if (gelf_getshdr(scn, &sdata.ds_shdr) == NULL) { in dis_tgt_section_iter()
791 if ((sdata.ds_data = elf_getdata(scn, NULL)) == NULL) { in dis_tgt_section_iter()
814 dis_section_istext(dis_scn_t *scn) in dis_section_istext() argument
816 return ((scn->ds_shdr.sh_type == SHT_PROGBITS) && in dis_section_istext()
817 (scn->ds_shdr.sh_flags == (SHF_ALLOC | SHF_EXECINSTR))); in dis_section_istext()
824 dis_section_data(dis_scn_t *scn) in dis_section_data() argument
826 return (scn->ds_data->d_buf); in dis_section_data()
833 dis_section_size(dis_scn_t *scn) in dis_section_size() argument
835 return (scn->ds_data->d_size); in dis_section_size()
842 dis_section_addr(dis_scn_t *scn) in dis_section_addr() argument
844 return (scn->ds_shdr.sh_addr); in dis_section_addr()
851 dis_section_name(dis_scn_t *scn) in dis_section_name() argument
853 return (scn->ds_name); in dis_section_name()
860 dis_section_copy(dis_scn_t *scn) in dis_section_copy() argument
865 (void) memcpy(new, scn, sizeof (dis_scn_t)); in dis_section_copy()
874 dis_section_free(dis_scn_t *scn) in dis_section_free() argument
876 free(scn); in dis_section_free()
889 Elf_Scn *scn; in dis_tgt_function_iter() local
902 if ((scn = elf_getscn(tgt->dt_elf, sym->se_shndx)) == NULL || in dis_tgt_function_iter()
903 gelf_getshdr(scn, &shdr) == NULL || in dis_tgt_function_iter()
904 (df.df_data = elf_getdata(scn, NULL)) == NULL || in dis_tgt_function_iter()