/titanic_41/usr/src/cmd/sgs/elfdump/common/ |
H A D | dwarf.c | 76 dwarf_extract_uint(uchar_t *data, size_t len, uint64_t *ndx, int size, in dwarf_extract_uint() argument 79 if (((*ndx + size) > len) || in dwarf_extract_uint() 80 ((*ndx + size) < *ndx)) in dwarf_extract_uint() 85 *ret = (data[(*ndx)++]); in dwarf_extract_uint() 92 data += *ndx; in dwarf_extract_uint() 98 (*ndx) += 2; in dwarf_extract_uint() 107 data += *ndx; in dwarf_extract_uint() 113 (*ndx) += 4; in dwarf_extract_uint() 123 data += *ndx; in dwarf_extract_uint() 129 (*ndx) += 8; in dwarf_extract_uint() [all …]
|
/titanic_41/usr/src/cmd/sgs/elfedit/modules/common/ |
H A D | str.c | 120 Word ndx; /* Table offset if (argc > 0) */ member 199 shndx_to_strtab(elfedit_obj_state_t *obj_state, Word ndx) in shndx_to_strtab() argument 206 if (ndx < obj_state->os_shnum) { in shndx_to_strtab() 207 Shdr *shdr = obj_state->os_secarr[ndx].sec_shdr; in shndx_to_strtab() 213 ndx = shdr->sh_link; in shndx_to_strtab() 221 ndx = shdr->sh_link; in shndx_to_strtab() 222 if (ndx < obj_state->os_shnum) in shndx_to_strtab() 223 ndx = in shndx_to_strtab() 224 obj_state->os_secarr[ndx].sec_shdr->sh_link; in shndx_to_strtab() 229 return (ndx); in shndx_to_strtab() [all …]
|
H A D | cap.c | 186 cap_group_extents(ARGSTATE *argstate, Word ndx, Word *ret_start_ndx, in cap_group_extents() argument 189 *ret_end_ndx = ndx; in cap_group_extents() 195 while ((ndx > 0) && (argstate->cap.data[ndx].c_tag == CA_SUNW_NULL)) in cap_group_extents() 196 ndx--; in cap_group_extents() 197 while ((ndx > 0) && (argstate->cap.data[ndx - 1].c_tag != CA_SUNW_NULL)) in cap_group_extents() 198 ndx--; in cap_group_extents() 199 *ret_start_ndx = ndx; in cap_group_extents() 205 ndx = *ret_end_ndx; in cap_group_extents() 206 while (((ndx + 1) < argstate->cap.num) && in cap_group_extents() 207 (argstate->cap.data[ndx].c_tag != CA_SUNW_NULL)) in cap_group_extents() [all …]
|
H A D | dyn.c | 190 Word ndx; in convert_dt_null() local 206 ndx = argstate->dyn.null_ndx; in convert_dt_null() 207 dyn = &argstate->dyn.data[ndx]; in convert_dt_null() 214 return (ndx); in convert_dt_null() 298 Word end_ndx, ndx, printed = 0; in print_dyn() local 329 ndx = arg; in print_dyn() 331 ndx = 0; in print_dyn() 342 dyn = &argstate->dyn.data[ndx]; in print_dyn() 353 for (; (ndx < argstate->dyn.num) && in print_dyn() 354 ((print_type != PRINT_DYN_T_NDX) || ((ndx == arg) || one_shot)); in print_dyn() [all …]
|
H A D | shdr.c | 213 Word ndx, Word cnt, PRINT_SHDR_T print_type) in print_shdr() argument 219 elfedit_section_t *ref_sec = &argstate->obj_state->os_secarr[ndx]; in print_shdr() 233 for (; cnt--; ndx++) { in print_shdr() 234 elfedit_section_t *sec = &argstate->obj_state->os_secarr[ndx]; in print_shdr() 256 elfedit_printf(MSG_INTL(MSG_ELF_SHDR), ndx, in print_shdr() 362 Word ndx; in cmd_body() local 383 ndx = elfedit_atoshndx(argstate.argv[0], obj_state->os_shnum); in cmd_body() 386 ndx = elfedit_type_to_shndx(obj_state, in cmd_body() 390 ndx = elfedit_name_to_shndx(obj_state, argstate.argv[0]); in cmd_body() 399 1 : obj_state->os_shnum - ndx; in cmd_body() [all …]
|
H A D | syminfo.c | 257 dump_syminfo(ARGSTATE *argstate, Word ndx, Word cnt) in dump_syminfo() argument 263 syminfo = argstate->syminfo.data + ndx; in dump_syminfo() 266 sym = argstate->sym.data + ndx; in dump_syminfo() 278 for (; cnt-- > 0; ndx++, syminfo++, sym++) { in dump_syminfo() 294 Elf_syminfo_entry(0, ndx, syminfo, name, needed); in dump_syminfo() 314 Word ndx, Word cnt) in print_syminfo() argument 336 dump_syminfo(argstate, ndx, cnt); in print_syminfo() 350 for (syminfo += ndx; cnt--; syminfo++) { in print_syminfo() 402 for (syminfo += ndx; cnt--; syminfo++) { in print_syminfo() 470 Word str_offset, ndx, numdyn; in needed_to_boundto() local [all …]
|
H A D | sym.c | 150 Word ndx; /* If argstate.argc > 0, this is the table index */ member 243 dump_symtab(ARGSTATE *argstate, SYMSTATE *symstate, Word ndx, Word cnt) in dump_symtab() argument 258 sym = symstate->sym.data + ndx; in dump_symtab() 273 for (; cnt-- > 0; ndx++, sym++) { in dump_symtab() 275 MSG_ORIG(MSG_FMT_INDEX), EC_XWORD(ndx)); in dump_symtab() 277 symstate->versym.data[ndx]; in dump_symtab() 282 shndx = symstate->xshndx.data[ndx]; in dump_symtab() 311 sym1 = &symstate1->sym.data[symstate1->ndx]; in all_same() 312 sym2 = &symstate2->sym.data[symstate2->ndx]; in all_same() 367 data[symstate1->ndx]; in all_same() [all …]
|
H A D | phdr.c | 137 Word ndx; /* Index of header if cmd */ member 220 argstate->ndx = (Word) elfedit_atoui_range( in process_args() 232 argstate->ndx = (Word) elfedit_atoconst( in process_args() 236 if (phdr->p_type == argstate->ndx) { in process_args() 237 argstate->ndx = i; in process_args() 249 osabi, mach, argstate->ndx, 0, &inv_buf)); in process_args() 354 Word ndx, cnt, by_type, type; in print_phdr() local 373 ndx = argstate->ndx; in print_phdr() 377 type = argstate->obj_state->os_phdr[ndx].p_type; in print_phdr() 378 cnt = argstate->obj_state->os_phnum - ndx; in print_phdr() [all …]
|
/titanic_41/usr/src/cmd/sendmail/db/log/ |
H A D | log_rec.c | 222 __log_do_open(lp, uid, name, ftype, ndx) in __log_do_open() argument 227 u_int32_t ndx; 246 (void)__log_add_logid(lp, dbp, name, ndx); 258 __log_add_logid(logp, dbp, name, ndx) in __log_add_logid() argument 262 u_int32_t ndx; 276 if (logp->dbentry_cnt <= ndx) { 278 (ndx + DB_GROW_SIZE) * sizeof(DB_ENTRY))) != 0) 282 for (i = logp->dbentry_cnt; i < ndx + DB_GROW_SIZE; i++) { 294 NULL, &logp->dbentry[ndx].name)) != 0) 296 strcpy(logp->dbentry[ndx].name, name); [all …]
|
/titanic_41/usr/src/cmd/sgs/libelf/common/ |
H A D | gelf.c | 216 gelf_getphdr(Elf *elf, int ndx, GElf_Phdr *dst) in gelf_getphdr() argument 227 if (phnum <= ndx) { in gelf_getphdr() 239 Elf32_Phdr *p = &((Elf32_Phdr *)elf32_getphdr(elf))[ndx]; in gelf_getphdr() 254 *dst = ((GElf_Phdr *)phdrs)[ndx]; in gelf_getphdr() 263 gelf_update_phdr(Elf *elf, int ndx, GElf_Phdr *src) in gelf_update_phdr() argument 274 if (phnum < ndx) { in gelf_update_phdr() 281 Elf32_Phdr *dst = &((Elf32_Phdr *)elf32_getphdr(elf))[ndx]; in gelf_update_phdr() 301 dst[ndx] = *(GElf_Phdr *)src; in gelf_update_phdr() 468 gelf_getsym(Elf_Data * data, int ndx, GElf_Sym * dst) in gelf_getsym() argument 488 if ((entsize * ndx) >= data->d_size) { in gelf_getsym() [all …]
|
/titanic_41/usr/src/cmd/sgs/libld/common/ |
H A D | util.c | 321 str2chr(Lm_list *lml, int ndx, int argc, char **argv, char *arg, int c, in str2chr() argument 330 DBG_CALL(Dbg_args_str2chr(lml, ndx, opt, c)); in str2chr() 341 DBG_CALL(Dbg_args_str2chr(lml, ndx, opt, c)); in str2chr() 400 ld_getopt(Lm_list *lml, int ndx, int argc, char **argv) in ld_getopt() argument 410 if ((c = str2chr(lml, ndx, argc, argv, arg, 'R', in ld_getopt() 418 if ((c = str2chr(lml, ndx, argc, argv, arg, 'G', in ld_getopt() 423 } else if ((c = str2chr(lml, ndx, argc, argv, arg, 'h', in ld_getopt() 431 if ((c = str2chr(lml, ndx, argc, argv, arg, 'z', in ld_getopt() 441 if ((c = str2chr(lml, ndx, argc, argv, in ld_getopt() 452 if ((c = str2chr(lml, ndx, argc, argv, in ld_getopt() [all …]
|
H A D | unwind.c | 287 extract_uint(const uchar_t *data, uint64_t *ndx, int do_swap) in extract_uint() argument 292 data += *ndx; in extract_uint() 298 (*ndx) += 4; in extract_uint() 389 uint64_t ndx = 0; in ld_unwind_make_hdr() local 397 length = extract_uint(data + off, &ndx, bswap); in ld_unwind_make_hdr() 404 id = extract_uint(data + off, &ndx, bswap); in ld_unwind_make_hdr() 413 cieversion = data[off + ndx]; in ld_unwind_make_hdr() 414 ndx += 1; in ld_unwind_make_hdr() 558 uint64_t ndx = 0; in ld_unwind_populate_hdr() local 565 length = extract_uint(data + off, &ndx, bswap); in ld_unwind_populate_hdr() [all …]
|
H A D | files.c | 164 Word ndx, int ident, Ofl_desc *ofl) in process_section() argument 178 isp->is_scnndx = ndx; in process_section() 200 ifl->ifl_isdesc[ndx] = isp; in process_section() 821 Word ndx, cnum; in process_cap() local 860 for (ndx = 0, data = cdata; ndx < cnum; ndx++, data++) { in process_cap() 869 if (ndx == 0) in process_cap() 889 descapndx = ndx; in process_cap() 931 for (ndx = 0, data = cdata; ndx < cnum; ndx++, data++) { in process_cap() 1041 for (ndx = 0, data = cdata; ndx < cnum; ndx++, data++) { in process_cap() 1068 (ndx - descapndx), ofl, in process_cap() [all …]
|
H A D | groups.c | 100 size_t ndx; in ld_get_group() local 110 for (ndx = 1; ndx < gdp->gd_cnt; ndx++) { in ld_get_group() 111 if (data[ndx] == scnndx) in ld_get_group() 171 size_t ndx; in ld_group_process() local 279 for (ndx = 1; ndx < gd.gd_cnt; ndx++) { in ld_group_process() 282 if ((gndx = gd.gd_data[ndx]) >= gifl->ifl_shnum) { in ld_group_process() 285 EC_WORD(gisc->is_scnndx), gisc->is_name, ndx, gndx); in ld_group_process()
|
/titanic_41/usr/src/cmd/sgs/liblddbg/common/ |
H A D | args.c | 31 Dbg_args_option(Lm_list *lml, int ndx, int c, char *optarg) in Dbg_args_option() argument 37 dbg_print(lml, MSG_INTL(MSG_ARG_OPTARG), ndx, c, optarg); in Dbg_args_option() 39 dbg_print(lml, MSG_INTL(MSG_ARG_OPTION), ndx, c); in Dbg_args_option() 43 Dbg_args_str2chr(Lm_list *lml, int ndx, const char *opt, int c) in Dbg_args_str2chr() argument 48 dbg_print(lml, MSG_INTL(MSG_ARG_STR2CHR), ndx, opt, c); in Dbg_args_str2chr() 52 Dbg_args_Wldel(Lm_list *lml, int ndx, const char *opt) in Dbg_args_Wldel() argument 57 dbg_print(lml, MSG_INTL(MSG_ARG_WLDEL), ndx, opt); in Dbg_args_Wldel() 61 Dbg_args_file(Lm_list *lml, int ndx, char *file) in Dbg_args_file() argument 66 dbg_print(lml, MSG_INTL(MSG_ARG_FILE), ndx, file); in Dbg_args_file()
|
H A D | support.c | 74 Support_ndx ndx, const char *name) in Dbg_support_action() argument 83 if (ndx == LDS_START) in Dbg_support_action() 85 else if ((ndx == LDS_OPEN) || (ndx == LDS_FILE)) in Dbg_support_action() 87 else if (ndx == LDS_INSEC) in Dbg_support_action() 89 else if (ndx == LDS_SEC) in Dbg_support_action() 92 if ((ndx == LDS_ATEXIT) || (ndx == LDS_VERSION) || in Dbg_support_action() 93 (ndx == LDS_INPUT_DONE)) in Dbg_support_action()
|
H A D | tls.c | 79 ulong_t ndx; in Dbg_tls_static_block() local 84 for (ndx = 0; tlsmodlist[ndx]; ndx++) { in Dbg_tls_static_block() 85 dbg_print(lml, MSG_INTL(MSG_TLS_STATBLOCK1), ndx, in Dbg_tls_static_block() 86 tlsmodlist[ndx]->tm_modname); in Dbg_tls_static_block() 87 Dbg_tls_modent(lml, tlsmodlist[ndx]); in Dbg_tls_static_block()
|
/titanic_41/usr/src/cmd/sgs/libelf/demo/ |
H A D | dcom.c | 93 int tfd, *shndx, ndx = 1, off = 0; in delete_comment() local 142 shndx[ndx] = -1; in delete_comment() 158 shndx[ndx] = ndx - off; in delete_comment() 159 ndx++; in delete_comment() 195 ndx = 1; in delete_comment() 201 if (shndx[ndx] == -1) { in delete_comment() 202 ndx++; in delete_comment() 242 tshdr.sh_info = shndx[ndx]; in delete_comment() 263 ndx++; in delete_comment() 306 for (ndx = 0; ndx < (int)phnum; ndx++) { in delete_comment() [all …]
|
/titanic_41/usr/src/cmd/sgs/elfedit/common/ |
H A D | elfedit_machelf.c | 129 uint_t ndx; in elfedit64_init_obj_state() local 178 for (ndx = 1, scn = NULL; scn = elf_nextscn(tstate.os_elf, scn); in elfedit64_init_obj_state() 179 ndx++) { in elfedit64_init_obj_state() 187 tstate.os_dynndx = ndx; in elfedit64_init_obj_state() 201 symtabndx[tstate.os_symtabnum++] = ndx; in elfedit64_init_obj_state() 260 for (ndx = 0; ndx < obj_state->os_symtabnum; ndx++) in elfedit64_init_obj_state() 261 obj_state->os_symtab[ndx].symt_shndx = symtabndx[ndx]; in elfedit64_init_obj_state() 265 for (ndx = 1, scn = NULL; scn = elf_nextscn(tstate.os_elf, scn); in elfedit64_init_obj_state() 266 ndx++, _cache++) { in elfedit64_init_obj_state() 267 _cache->sec_shndx = ndx; in elfedit64_init_obj_state() [all …]
|
H A D | util_machelf.c | 99 elfedit_dyn_elt_save(elfedit_dyn_elt_t *elt, Word ndx, Dyn *dyn) in elfedit_dyn_elt_save() argument 102 elt->dn_ndx = ndx; in elfedit_dyn_elt_save() 122 Word ndx; in elfedit_name_to_shndx() local 125 for (ndx = 0; ndx < shnum; ndx++, sec++) { in elfedit_name_to_shndx() 130 return (ndx); in elfedit_name_to_shndx() 158 Word ndx; in elfedit_type_to_shndx() local 161 for (ndx = 0; ndx < shnum; ndx++, sec++) { in elfedit_type_to_shndx() 170 return (ndx); in elfedit_type_to_shndx() 218 Word ndx, offset; in elfedit_name_to_symndx() local 221 for (ndx = 0; ndx < cnt; ndx++) { in elfedit_name_to_symndx() [all …]
|
/titanic_41/usr/src/cmd/sgs/libconv/common/ |
H A D | dynamic.c | 771 int ndx = 0; in conv_dyn_tag_strings() local 795 retarr[ndx++] = CONV_DS_ADDR(ds_null_cf); in conv_dyn_tag_strings() 797 retarr[ndx++] = CONV_DS_ADDR(ds_sunw_auxiliary_cf); in conv_dyn_tag_strings() 798 retarr[ndx++] = CONV_DS_ADDR(ds_checksum_cf); in conv_dyn_tag_strings() 799 retarr[ndx++] = CONV_DS_ADDR(ds_config_cf); in conv_dyn_tag_strings() 800 retarr[ndx++] = CONV_DS_ADDR(ds_versym_cf); in conv_dyn_tag_strings() 801 retarr[ndx++] = CONV_DS_ADDR(ds_relacount_cf); in conv_dyn_tag_strings() 803 retarr[ndx++] = CONV_DS_ADDR(ds_auxiliary_cf); in conv_dyn_tag_strings() 805 retarr[ndx++] = CONV_DS_ADDR(ds_sparc_reg_cf); in conv_dyn_tag_strings() 806 retarr[ndx++] = CONV_DS_ADDR(ds_sdreg_cf); in conv_dyn_tag_strings() [all …]
|
/titanic_41/usr/src/cmd/sgs/rtld/common/ |
H A D | tsort.c | 94 int ndx; in sort_scc() local 112 ndx = 1; in sort_scc() 117 IDX(lmp) = ndx++; in sort_scc() 141 IDX(lmp3) = ndx++; in sort_scc() 176 for (ndx = fndx; ndx < sort->s_lndx; ndx++) { in sort_scc() 177 lmp = sort->s_lmpa[ndx]; in sort_scc() 182 DBG_CALL(Dbg_util_scc_entry(lmp, ndx)); in sort_scc() 187 for (ndx = sort->s_lndx - 1; ndx >= fndx; ndx--) { in sort_scc() 188 lmp = sort->s_lmpa[ndx]; in sort_scc() 189 DBG_CALL(Dbg_util_scc_entry(lmp, ndx)); in sort_scc() [all …]
|
/titanic_41/usr/src/uts/intel/ia32/krtld/ |
H A D | kobj_convrelstr.c | 67 int ndx = 31; in conv_reloc_386_type() local 72 strbuf[ndx--] = '\0'; in conv_reloc_386_type() 74 strbuf[ndx--] = '0' + (type % 10); in conv_reloc_386_type() 76 } while ((ndx >= (int)0) && (type > (Word)0)); in conv_reloc_386_type() 78 return (&strbuf[ndx + 1]); in conv_reloc_386_type()
|
/titanic_41/usr/src/uts/intel/amd64/krtld/ |
H A D | kobj_convrelstr.c | 64 int ndx = 31; in conv_reloc_amd64_type() local 69 strbuf[ndx--] = '\0'; in conv_reloc_amd64_type() 71 strbuf[ndx--] = '0' + (type % 10); in conv_reloc_amd64_type() 73 } while ((ndx >= (int)0) && (type > (Word)0)); in conv_reloc_amd64_type() 75 return (&strbuf[ndx + 1]); in conv_reloc_amd64_type()
|
/titanic_41/usr/src/uts/sparc/krtld/ |
H A D | kobj_convrelstr.c | 91 int ndx = 31; in conv_reloc_SPARC_type() local 96 strbuf[ndx--] = '\0'; in conv_reloc_SPARC_type() 98 strbuf[ndx--] = '0' + (type % 10); in conv_reloc_SPARC_type() 100 } while ((ndx >= (int)0) && (type > (Word)0)); in conv_reloc_SPARC_type() 102 return (&strbuf[ndx + 1]); in conv_reloc_SPARC_type()
|