/illumos-gate/usr/src/uts/common/fs/zfs/ |
H A D | dsl_scan.c | 123 static void scan_ds_queue_clear(dsl_scan_t *scn); 124 static boolean_t scan_ds_queue_contains(dsl_scan_t *scn, uint64_t dsobj, 126 static void scan_ds_queue_insert(dsl_scan_t *scn, uint64_t dsobj, uint64_t txg); 127 static void scan_ds_queue_remove(dsl_scan_t *scn, uint64_t dsobj); 128 static void scan_ds_queue_sync(dsl_scan_t *scn, dmu_tx_t *tx); 209 #define DSL_SCAN_IS_SCRUB_RESILVER(scn) \ argument 210 ((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB || \ 211 (scn)->scn_phys.scn_func == POOL_SCAN_RESILVER) 338 static void scan_io_queues_destroy(dsl_scan_t *scn); 394 dsl_scan_is_running(const dsl_scan_t *scn) in dsl_scan_is_running() argument [all …]
|
/illumos-gate/usr/src/cmd/sgs/libelf/common/ |
H A D | flag.c | 40 Elf_Scn * scn; in elf_flagdata() local 46 scn = d->db_scn; in elf_flagdata() 47 elf = scn->s_elf; in elf_flagdata() 49 READLOCKS(elf, scn) in elf_flagdata() 57 READUNLOCKS(elf, scn) in elf_flagdata() 132 elf_flagscn(Elf_Scn * scn, Elf_Cmd cmd, unsigned flags) in elf_flagscn() argument 137 if (scn == 0) in elf_flagscn() 140 elf = scn->s_elf; in elf_flagscn() 142 READLOCKS(elf, scn) in elf_flagscn() 143 rc = scn->s_uflags |= flags; in elf_flagscn() [all …]
|
H A D | rawdata.c | 37 elf_rawdata(Elf_Scn * scn, Elf_Data * data) in elf_rawdata() argument 44 if (scn == 0) in elf_rawdata() 46 elf = scn->s_elf; in elf_rawdata() 47 READLOCKS(elf, scn) in elf_rawdata() 48 if ((scn->s_myflags & SF_READY) == 0) { in elf_rawdata() 49 UPGRADELOCKS(elf, scn) in elf_rawdata() 50 if ((scn->s_myflags & SF_READY) == 0) in elf_rawdata() 51 (void) _elf_cookscn(scn); in elf_rawdata() 52 DOWNGRADELOCKS(elf, scn) in elf_rawdata() 56 d = scn->s_hdnode; in elf_rawdata() [all …]
|
H A D | getdata.c | 111 _elf_locked_getdata(Elf_Scn * scn, Elf_Data * data) in _elf_locked_getdata() argument 118 assert(!elf_threaded || RW_LOCK_HELD(&(scn->s_elf->ed_rwlock))); in _elf_locked_getdata() 119 assert(!elf_threaded || MUTEX_HELD(&(scn->s_mutex))); in _elf_locked_getdata() 120 elf = scn->s_elf; in _elf_locked_getdata() 122 if ((scn->s_myflags & SF_READY) == 0) { in _elf_locked_getdata() 123 UPGRADELOCKS(elf, scn) in _elf_locked_getdata() 128 if ((scn->s_myflags & SF_READY) == 0) in _elf_locked_getdata() 129 (void) _elf_cookscn(scn); in _elf_locked_getdata() 130 DOWNGRADELOCKS(elf, scn) in _elf_locked_getdata() 134 d = scn->s_hdnode; in _elf_locked_getdata() [all …]
|
H A D | getshdr.c | 36 getshdr(Elf_Scn * scn, int class) in getshdr() argument 40 if (scn == 0) in getshdr() 42 elf = scn->s_elf; in getshdr() 43 READLOCKS(elf, scn) in getshdr() 45 READUNLOCKS(elf, scn) in getshdr() 50 rc = scn->s_shdr; in getshdr() 51 READUNLOCKS(elf, scn) in getshdr() 56 elf32_getshdr(Elf_Scn * scn) in elf32_getshdr() argument 58 return ((Elf32_Shdr*) getshdr(scn, ELFCLASS32)); in elf32_getshdr() 62 elf64_getshdr(Elf_Scn * scn) in elf64_getshdr() argument [all …]
|
H A D | nextscn.c | 35 elf_nextscn(Elf * elf, Elf_Scn * scn) in elf_nextscn() argument 41 if (scn != 0) { in elf_nextscn() 42 READLOCKS(elf, scn) in elf_nextscn() 43 ret_scn = scn->s_next; in elf_nextscn() 44 READUNLOCKS(elf, scn) in elf_nextscn() 51 if ((scn = elf->ed_hdscn) != 0) in elf_nextscn() 52 ret_scn = scn->s_next; in elf_nextscn()
|
H A D | ndxscn.c | 35 elf_ndxscn(Elf_Scn * scn) in elf_ndxscn() argument 40 if (scn == 0) in elf_ndxscn() 42 elf = scn->s_elf; in elf_ndxscn() 43 READLOCKS(elf, scn) in elf_ndxscn() 44 rc = scn->s_index; in elf_ndxscn() 45 READUNLOCKS(elf, scn) in elf_ndxscn()
|
H A D | gelf.c | 331 gelf_getshdr(Elf_Scn *scn, GElf_Shdr *dst) in gelf_getshdr() argument 333 if (scn == NULL) in gelf_getshdr() 336 if (scn->s_elf->ed_class == ELFCLASS32) { in gelf_getshdr() 337 Elf32_Shdr *s = elf32_getshdr(scn); in gelf_getshdr() 342 READLOCKS(scn->s_elf, scn); in gelf_getshdr() 353 READUNLOCKS(scn->s_elf, scn); in gelf_getshdr() 356 } else if (scn->s_elf->ed_class == ELFCLASS64) { in gelf_getshdr() 357 Elf64_Shdr *s = elf64_getshdr(scn); in gelf_getshdr() 362 READLOCKS(scn->s_elf, scn); in gelf_getshdr() 364 READUNLOCKS(scn->s_elf, scn); in gelf_getshdr() [all …]
|
H A D | checksum.c | 106 Elf_Scn * scn; in elf_checksum() local 133 if ((scn = elf_getscn(elf, shnum)) == 0) in elf_checksum() 135 if ((shdr = getshdr(scn)) == 0) in elf_checksum() 158 while ((data = (*getdata)(scn, data)) != 0) in elf_checksum()
|
H A D | getshstrndx.c | 48 Elf_Scn *scn; in elf_getshdrstrndx() local 57 if ((scn = elf_getscn(elf, 0)) == 0) in elf_getshdrstrndx() 59 if (gelf_getshdr(scn, &shdr0) == 0) in elf_getshdrstrndx()
|
/illumos-gate/usr/src/cmd/dis/ |
H A D | dis_target.c | 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() [all …]
|
H A D | dis_main.c | 364 dis_text_section(dis_tgt_t *tgt, dis_scn_t *scn, void *data) in dis_text_section() argument 369 if (!dis_section_istext(scn)) in dis_text_section() 373 (void) printf("\nsection %s\n", dis_section_name(scn)); in dis_text_section() 375 dis_data(tgt, dhp, dis_section_addr(scn), dis_section_data(scn), in dis_text_section() 376 dis_section_size(scn)); in dis_text_section() 394 dis_named_section(dis_scn_t *scn, int type, void *data) in dis_named_section() argument 399 (void) printf("\nsection %s\n", dis_section_name(scn)); in dis_named_section() 403 dump_data(0, dis_section_data(scn), dis_section_size(scn)); in dis_named_section() 406 dump_data(dis_section_addr(scn), dis_section_data(scn), in dis_named_section() 407 dis_section_size(scn)); in dis_named_section() [all …]
|
/illumos-gate/usr/src/cmd/sgs/libelf/demo/ |
H A D | acom.c | 48 Elf_Scn *scn = NULL; in update_comment() local 59 while ((scn = elf_nextscn(elf, scn)) != NULL) { in update_comment() 65 if (gelf_getshdr(scn, &shdr) == NULL) { in update_comment() 75 if (scn == NULL) { in update_comment() 83 if ((scn = elf_getscn(elf, shstrndx)) == NULL) { in update_comment() 88 if ((data = elf_getdata(scn, NULL)) == NULL) { in update_comment() 94 if ((data = elf_newdata(scn)) == NULL) { in update_comment() 108 if ((scn = elf_newscn(elf)) == NULL) { in update_comment() 113 if (gelf_getshdr(scn, &shdr) == NULL) { in update_comment() 129 (void) gelf_update_shdr(scn, &shdr); in update_comment() [all …]
|
H A D | dcom.c | 87 Elf_Scn *scn = NULL; in delete_comment() local 126 while ((scn = elf_nextscn(elf, scn)) != NULL) { in delete_comment() 134 if (gelf_getshdr(scn, &shdr) == NULL) { in delete_comment() 194 scn = NULL; in delete_comment() 196 while ((scn = elf_nextscn(elf, scn)) != NULL) { in delete_comment() 210 if (gelf_getshdr(scn, &shdr) == NULL) { in delete_comment() 250 if ((data = elf_getdata(scn, 0)) == NULL) { in delete_comment()
|
H A D | pcom.c | 49 Elf_Scn *scn = NULL; in print_comment() local 63 while ((scn = elf_nextscn(elf, scn)) != NULL) { in print_comment() 69 if (gelf_getshdr(scn, &shdr) == NULL) { in print_comment() 83 if ((data = elf_getdata(scn, NULL)) == NULL) { in print_comment()
|
/illumos-gate/usr/src/cmd/sgs/elfedit/common/ |
H A D | elfedit_machelf.c | 128 Elf_Scn *scn; in elfedit64_init_obj_state() local 169 LIBELF((scn = elf_getscn(tstate.os_elf, tstate.os_shstrndx)), in elfedit64_init_obj_state() 171 LIBELF((data = elf_getdata(scn, NULL)), MSG_ORIG(MSG_ELF_GETDATA)) in elfedit64_init_obj_state() 179 for (ndx = 1, scn = NULL; in elfedit64_init_obj_state() 180 (scn = elf_nextscn(tstate.os_elf, scn)) != NULL; ndx++) { in elfedit64_init_obj_state() 183 LIBELF(shdr = elf_getshdr(scn), MSG_ORIG(MSG_ELF_GETSHDR)); in elfedit64_init_obj_state() 251 LIBELF(scn = elf_getscn(tstate.os_elf, 0), in elfedit64_init_obj_state() 253 _cache->sec_scn = scn; in elfedit64_init_obj_state() 254 LIBELF(_cache->sec_shdr = elf_getshdr(scn), MSG_ORIG(MSG_ELF_GETSHDR)); in elfedit64_init_obj_state() 267 for (ndx = 1, scn = NULL; in elfedit64_init_obj_state() [all …]
|
/illumos-gate/usr/src/cmd/mdb/tools/common/ |
H A D | findscn.c | 36 Elf_Scn *scn = NULL; in findelfsecidx() local 43 while ((scn = elf_nextscn(elf, scn)) != NULL) { in findelfsecidx() 46 if (gelf_getshdr(scn, &shdr) == NULL || in findelfsecidx() 52 return (elf_ndxscn(scn)); in findelfsecidx()
|
/illumos-gate/usr/src/cmd/abi/appcert/static_prof/ |
H A D | static_prof.c | 612 Elf_Scn *scn; /* temp section header pointer */ in find_dynamic_sect() local 631 scn = 0; in find_dynamic_sect() 633 while ((scn = elf_nextscn(c->obj->elf, scn)) != 0) { in find_dynamic_sect() 636 scurrent = elf64_getshdr(scn); in find_dynamic_sect() 638 scurrent = elf32_getshdr(scn); in find_dynamic_sect() 644 if ((ddata = elf_getdata(scn, ddata)) == 0 || in find_dynamic_sect() 654 scn = elf_getscn(c->obj->elf, index); in find_dynamic_sect() 657 scurrent = elf64_getshdr(scn); in find_dynamic_sect() 659 scurrent = elf32_getshdr(scn); in find_dynamic_sect() 662 c->obj->ddata = elf_getdata(scn, (c->obj->ddata)); in find_dynamic_sect() [all …]
|
/illumos-gate/usr/src/cmd/lockstat/ |
H A D | sym.c | 140 Elf_Scn *scn = NULL; in symtab_init() local 155 for (cnt = 1; (scn = elf_nextscn(elf, scn)) != NULL; cnt++) { in symtab_init() 156 Shdr *shdr = elf_getshdr(scn); in symtab_init() 158 symtab = (Sym *)elf_getdata(scn, NULL)->d_buf; in symtab_init() 164 for (cnt = 1; (scn = elf_nextscn(elf, scn)) != NULL; cnt++) { in symtab_init() 166 strtab = (char *)elf_getdata(scn, NULL)->d_buf; in symtab_init()
|
/illumos-gate/usr/src/cmd/sgs/librtld/common/ |
H A D | dldump.c | 155 Elf_Scn *scn; in rt_dldump() local 317 if ((scn = elf_getscn(ielf, shndx)) == NULL) { in rt_dldump() 322 if ((data = elf_getdata(scn, NULL)) == NULL) { in rt_dldump() 360 for (scn = 0; scn = elf_nextscn(ielf, scn); _icache++) { in rt_dldump() 362 if ((_icache->c_shdr = shdr = elf_getshdr(scn)) == NULL) { in rt_dldump() 368 if ((_icache->c_data = elf_getdata(scn, NULL)) == NULL) { in rt_dldump() 374 _icache->c_scn = scn; in rt_dldump() 592 if ((scn = elf_newscn(oelf)) == NULL) { in rt_dldump() 597 if ((shdr = elf_getshdr(scn)) == NULL) { in rt_dldump() 617 if ((data = elf_newdata(scn)) == NULL) { in rt_dldump() [all …]
|
/illumos-gate/usr/src/cmd/boot/symdef/ |
H A D | symdef.c | 61 Elf_Scn *scn = NULL; in main() local 91 while ((scn = elf_nextscn(elfp, scn)) != NULL) { in main() 92 if ((gelf_getshdr(scn, &shdr) == NULL) || in main() 95 ((symdata = elf_getdata(scn, NULL)) == NULL)) in main()
|
/illumos-gate/usr/src/test/os-tests/tests/cores/secmapper/ |
H A D | secmapper.c | 219 secmap_data_cmp(secmap_t *sm, const char *sname, Elf_Scn *scn, GElf_Shdr *shdr) in secmap_data_cmp() argument 251 if ((src_data = elf_getdata(scn, NULL)) == NULL) { in secmap_data_cmp() 313 Elf_Scn *scn; in main() local 356 for (scn = elf_nextscn(elf, NULL); scn != NULL; in main() 357 scn = elf_nextscn(elf, scn)) { in main() 363 index = elf_ndxscn(scn); in main() 364 if (gelf_getshdr(scn, &shdr) == NULL) { in main() 408 secmap_data_cmp(secmap, sname, scn, &shdr); in main()
|
/illumos-gate/usr/src/cmd/sgs/libld/common/ |
H A D | files.c | 117 Elf_Scn *scn; in ifl_setup() local 120 if ((scn = elf_getscn(elf, 0)) == NULL) { in ifl_setup() 125 if ((shdr0 = elf_getshdr(scn)) == NULL) { in ifl_setup() 182 process_section(const char *name, Ifl_desc *ifl, Shdr *shdr, Elf_Scn *scn, in process_section() argument 201 if ((isp->is_indata = elf_getdata(scn, NULL)) == NULL) { in process_section() 1320 process_input(const char *name, Ifl_desc *ifl, Shdr *shdr, Elf_Scn *scn, in process_input() argument 1323 return (process_section(name, ifl, shdr, scn, ndx, in process_input() 1335 process_reloc(const char *name, Ifl_desc *ifl, Shdr *shdr, Elf_Scn *scn, in process_reloc() argument 1339 shdr, scn, ndx, ld_targ.t_id.id_null, ofl) == S_ERROR) in process_reloc() 1360 process_strtab(const char *name, Ifl_desc *ifl, Shdr *shdr, Elf_Scn *scn, in process_strtab() argument [all …]
|
/illumos-gate/usr/src/cmd/sgs/link_audit/common/ |
H A D | who.c | 155 Elf_Scn *scn; in load_syms() local 172 scn = NULL; in load_syms() 173 while ((scn = elf_nextscn(elf, scn)) != NULL) { in load_syms() 177 shdr = elf_getshdr(scn); in load_syms() 180 data = elf_getdata(scn, 0); in load_syms() 184 scn = elf_getscn(elf, shdr->sh_link); in load_syms() 185 data = elf_getdata(scn, 0); in load_syms()
|
/illumos-gate/usr/src/lib/libctf/common/ |
H A D | ctf_convert.c | 39 Elf_Scn *scn, *strscn; in ctf_has_c_source() local 44 scn = NULL; in ctf_has_c_source() 45 while ((scn = elf_nextscn(elf, scn)) != NULL) { in ctf_has_c_source() 46 if (gelf_getshdr(scn, &shdr) == NULL) { in ctf_has_c_source() 57 if (scn == NULL) { in ctf_has_c_source() 68 if ((data = elf_getdata(scn, NULL)) == NULL) { in ctf_has_c_source()
|