/illumos-gate/usr/src/boot/sys/sys/ |
H A D | linker_set.h | 57 #define __MAKE_SET(set, sym) \ argument 61 __set_##set##_sym_##sym __section("set_" #set) \ 62 __used = &(sym) 67 #define __MAKE_SET(set, sym) extern void const * const (__set_##set##_sym_##sym) argument 73 #define TEXT_SET(set, sym) __MAKE_SET(set, sym) argument 74 #define DATA_SET(set, sym) __MAKE_SET(set, sym) argument 75 #define BSS_SET(set, sym) __MAKE_SET(set, sym) argument 76 #define ABS_SET(set, sym) __MAKE_SET(set, sym) argument 77 #define SET_ENTRY(set, sym) __MAKE_SET(set, sym) argument
|
/illumos-gate/usr/src/tools/smatch/src/ |
H A D | scope.c | 45 sym->scope = scope; in bind_scope() 46 add_symbol(&scope->symbols, sym); in bind_scope() 51 struct scope *old = sym->scope; in rebind_scope() 59 bind_scope(sym, new); in rebind_scope() 98 struct symbol **ptr = &sym->ident->symbols; in remove_symbol_scope() 100 while (*ptr != sym) in remove_symbol_scope() 102 *ptr = sym->next_id; in remove_symbol_scope() 109 struct symbol *sym; in end_scope() local 113 FOR_EACH_PTR(symbols, sym) { in end_scope() 114 remove_symbol_scope(sym); in end_scope() [all …]
|
H A D | check_frees_argument.c | 35 this_func = sym; in match_function_def() 45 if (sym == arg && !strcmp(name, arg_name)) in is_arg() 54 struct symbol *sym; in match_kfree() local 59 name = expr_to_var_sym(tmp, &sym); in match_kfree() 60 if (is_arg(name, sym)) { in match_kfree() 61 set_state(my_id, name, sym, &freed); in match_kfree() 81 tmp->sym); in match_return() 88 tracker->sym); in match_return() 93 static void print_arg(struct symbol *sym) in print_arg() argument 99 if (sym == arg) { in print_arg() [all …]
|
H A D | test-unssa.c | 31 struct symbol *sym = ep->name; in output_fn() local 32 const char *name = show_ident(sym->ident); in output_fn() 34 if (sym->ctype.modifiers & MOD_STATIC) in output_fn() 49 static int output_data(struct symbol *sym) in output_data() argument 51 printf("symbol %s:\n", show_ident(sym->ident)); in output_data() 60 struct symbol *sym; in compile() local 61 FOR_EACH_PTR(list, sym) { in compile() 63 expand_symbol(sym); in compile() 64 ep = linearize_symbol(sym); in compile() 70 output_data(sym); in compile() [all …]
|
H A D | sparse-llvm.c | 81 sym->aux = ret; in sym_struct_type() 143 die("invalid bit size %d for type %d", sym->bit_size, sym->type); in sym_basetype_type() 167 die("invalid bit size %d for type %d", sym->bit_size, sym->type); in sym_basetype_type() 183 if (sym->aux) in symbol_type() 184 return sym->aux; in symbol_type() 186 switch (sym->type) { in symbol_type() 217 sym->aux = ret; in symbol_type() 1242 name = sym->ident ? show_ident(sym->ident) : "" ; in output_data() 1263 sym = sym->ctype.base_type; in is_prototype() 1264 return sym && sym->type == SYM_FN && !sym->stmt; in is_prototype() [all …]
|
H A D | sparse.c | 205 ident = fn->sym->ident; in check_call_instruction() 284 if (sym->bit_size <= 0) in list_compound_symbol() 286 if (!sym->ctype.base_type) in list_compound_symbol() 289 if (!sym->ident) in list_compound_symbol() 295 base = sym; in list_compound_symbol() 304 show_typename(sym), in list_compound_symbol() 306 sym->ctype.alignment); in list_compound_symbol() 311 struct symbol *sym; in check_symbols() local 313 FOR_EACH_PTR(list, sym) { in check_symbols() 316 expand_symbol(sym); in check_symbols() [all …]
|
H A D | check_locking.c | 474 *sym = NULL; in get_full_name() 640 struct symbol *sym; in handle_macro_lock_unlock() local 663 if (!name || !sym) in handle_macro_lock_unlock() 726 sym = sm->sym; in do_unlock() 753 struct symbol *sym; in match_lock_held() local 776 struct symbol *sym; in match_lock_failed() local 799 struct symbol *sym; in match_returns_locked() local 814 struct symbol *sym; in match_lock_unlock() local 973 if (!sym || !sym->ident) in sym_in_lock_table() 1114 struct symbol *sym; in db_param_locked_unlocked() local [all …]
|
H A D | smatch_param_used.c | 38 arg = get_param_num_from_sym(sym); in get_state_hook() 41 if (param_was_set_var_sym(name, sym)) in get_state_hook() 43 set_state_stree(&used_stree, my_id, name, sym, &used); in get_state_hook() 48 struct symbol *sym; in set_param_used() local 55 name = get_variable_from_key(arg, key, &sym); in set_param_used() 56 if (!name || !sym) in set_param_used() 59 arg_nr = get_param_num_from_sym(sym); in set_param_used() 62 if (param_was_set_var_sym(name, sym)) in set_param_used() 64 set_state_stree(&used_stree, my_id, name, sym, &used); in set_param_used() 76 arg = get_param_num_from_sym(tmp->sym); in process_states() [all …]
|
H A D | smatch_ignore.c | 27 set_state_stree(&ignored, owner, name, sym, &ignore); in add_ignore() 30 int is_ignored(int owner, const char *name, struct symbol *sym) in is_ignored() argument 32 return !!get_state_stree(ignored, owner, name, sym); in is_ignored() 37 struct symbol *sym; in add_ignore_expr() local 40 name = expr_to_str_sym(expr, &sym); in add_ignore_expr() 41 if (!name || !sym) in add_ignore_expr() 43 add_ignore(owner, name, sym); in add_ignore_expr() 49 struct symbol *sym; in is_ignored_expr() local 53 name = expr_to_str_sym(expr, &sym); in is_ignored_expr() 54 if (!name && !sym) in is_ignored_expr() [all …]
|
H A D | check_atomic_inc_dec.c | 102 struct symbol *sym; in db_inc_dec() local 115 if (!name || !sym) in db_inc_dec() 118 start_sm = get_sm_state(my_id, name, sym); in db_inc_dec() 125 sym = start_sm->sym; in db_inc_dec() 131 set_start_state(name, sym, &dec); in db_inc_dec() 133 set_state(my_id, name, sym, &inc); in db_inc_dec() 137 set_start_state(name, sym, &inc); in db_inc_dec() 142 set_state(my_id, name, sym, &dec); in db_inc_dec() 350 if (parent_is_gone_var_sym(name, sym)) in check_counter() 353 sm = get_sm_state(my_id, name, sym); in check_counter() [all …]
|
H A D | check_uninitialized.c | 38 struct_type = get_real_base_type(sym); in mark_members_uninitialized() 57 if (sym->initializer) in match_declarations() 60 type = get_real_base_type(sym); in match_declarations() 66 if (sym->ctype.modifiers & MOD_STATIC) in match_declarations() 69 if (!sym->ident) in match_declarations() 73 mark_members_uninitialized(sym); in match_declarations() 77 set_state(my_id, sym->ident->name, sym, &uninitialized); in match_declarations() 82 if (!sym || !sym->ident) in extra_mod_hook() 235 struct symbol *type, *sym; in match_call_struct_members() local 256 if (!arg_name || !sym) in match_call_struct_members() [all …]
|
H A D | smatch_extra.c | 211 assigned = get_assigned_expr_name_sym(sym->ident->name, sym); in get_pointed_at() 308 if (!sym || !sym->ident) in get_other_name_sym_helper() 407 store_link(link_id, vs->var, vs->sym, name, sym); in set_extra_array_mod() 428 if (!name || !sym) in set_extra_expr_mod() 474 store_link(link_id, vs->var, vs->sym, name, sym); in set_extra_nomod_vsl() 494 store_link(link_id, vs->var, vs->sym, name, sym); in set_extra_expr_nomod() 561 store_link(link_id, vs->var, vs->sym, name, sym); in set_extra_chunk_true_false() 913 if (!sym || !(sym->ctype.modifiers & MOD_TOPLEVEL) || !sym->ident) in get_global_rl() 955 if (tmp->sym != sym) in clear_the_pointed_at() 1047 store_link(link_id, vs->var, vs->sym, name, sym); in save_chunk_info() [all …]
|
H A D | smatch_param_set.c | 58 if (get_state(my_id, name, sym)) in parent_is_set() 88 if (parent_is_set(name, sym, state)) in extra_mod_hook() 90 if (get_param_num_from_sym(sym) < 0) in extra_mod_hook() 92 set_state(my_id, name, sym, state); in extra_mod_hook() 103 struct symbol *sym; in match_array_assignment() local 119 name = expr_to_var_sym(array, &sym); in match_array_assignment() 120 if (!name || !sym) in match_array_assignment() 122 if (get_param_num_from_sym(sym) < 0) in match_array_assignment() 316 struct symbol *sym; in param_was_set() local 319 name = expr_to_var_sym(expr, &sym); in param_was_set() [all …]
|
H A D | smatch_helper.c | 496 return sym; in expr_to_sym() 570 if (sym) in expr_to_chunk_helper() 579 if (sym) in expr_to_chunk_helper() 597 if (sym) { in expr_to_chunk_helper() 602 *sym = vs->sym; in expr_to_chunk_helper() 889 if (!sym) in get_struct_and_member() 913 if (!sym) in get_member_name() 917 sym->ident ? sym->ident->name : "anonymous", in get_member_name() 937 if (!sym || sym->type != SYM_STRUCT || !sym->ident) in get_member_name() 1067 if (!sym) in get_param_num_from_sym() [all …]
|
H A D | smatch_param_limit.c | 69 state = __get_state(SMATCH_EXTRA, sm->name, sm->sym); in unmatched_state() 79 state = get_state(my_id, name, sym); in get_orig_estate() 83 state = get_state(SMATCH_EXTRA, name, sym); in get_orig_estate() 86 return alloc_estate_rl(alloc_whole_rl(get_real_base_type(sym))); in get_orig_estate() 93 state = get_state(my_id, name, sym); in get_orig_estate_type() 97 state = get_state(SMATCH_EXTRA, name, sym); in get_orig_estate_type() 142 param = get_param_num_from_sym(tmp->sym); in print_return_value_param() 150 state = __get_state(my_id, tmp->name, tmp->sym); in print_return_value_param() 174 param = get_param_num_from_sym(sym); in extra_mod_hook() 178 orig_vals = get_orig_estate_type(name, sym, estate_type(state)); in extra_mod_hook() [all …]
|
H A D | check_frees_param_strict.c | 44 set_state(my_id, sm->name, sm->sym, &ignore); in set_ignore() 50 struct symbol *sym; in counter_was_inced() local 54 name = expr_to_var_sym(expr, &sym); in counter_was_inced() 55 if (!name || !sym) in counter_was_inced() 59 ret = was_inced(buf, sym); in counter_was_inced() 93 struct symbol *sym; in set_param_freed() local 104 if (!name || !sym) in set_param_freed() 106 if (get_param_num_from_sym(sym) < 0) in set_param_freed() 109 if (param_was_set_var_sym(name, sym)) in set_param_freed() 112 set_state(my_id, name, sym, &freed); in set_param_freed() [all …]
|
H A D | smatch_nul_terminator.c | 30 if (get_param_num_from_sym(sym) >= 0) in set_terminated_var_sym() 31 set_state(param_set_id, name, sym, &set); in set_terminated_var_sym() 32 set_state(my_id, name, sym, state); in set_terminated_var_sym() 37 struct symbol *sym; in set_terminated() local 40 name = expr_to_var_sym(expr, &sym); in set_terminated() 41 if (!name || !sym) in set_terminated() 43 set_terminated_var_sym(name, sym, state); in set_terminated() 76 sm = get_sm_state(my_id, name, sym); in get_terminated_state_var_sym() 218 if (sm->sym != returned_sym) in split_return_info() 235 struct symbol *sym; in return_info_terminated() local [all …]
|
H A D | check_deref.c | 61 set_state(my_id, sm->name, sm->sym, &ok); in is_ok() 87 add_ignore(my_id, sm->name, sm->sym); in check_dereference() 109 sm = get_sm_state(my_id, name, sym); in check_dereference_name_sym() 124 add_ignore(my_id, sm->name, sm->sym); in check_dereference_name_sym() 157 struct symbol *sym; in set_param_dereferenced() local 161 if (!name || !sym) in set_param_dereferenced() 164 check_dereference_name_sym(name, sym); in set_param_dereferenced() 176 if (!sym->ident) in match_declarations() 178 name = sym->ident->name; in match_declarations() 179 if (!sym->initializer) { in match_declarations() [all …]
|
H A D | smatch_param_filter.c | 66 if (parent_is_gone_var_sym(sm->name, sm->sym)) in unmatched_state() 69 state = __get_state(SMATCH_EXTRA, sm->name, sm->sym); in unmatched_state() 83 extra = get_state(SMATCH_EXTRA, cur->name, cur->sym); in pre_merge_hook() 100 param = get_param_num_from_sym(sym); in extra_mod_hook() 105 if (sym->ident && strcmp(sym->ident->name, name) == 0) in extra_mod_hook() 108 set_state(my_id, name, sym, alloc_estate_empty()); in extra_mod_hook() 167 param = get_param_num_from_sym(tmp->sym); in print_return_value_param() 172 if (tmp->sym->ident && strcmp(tmp->sym->ident->name, tmp->name) == 0) in print_return_value_param() 178 sm = get_sm_state(my_id, tmp->name, tmp->sym); in print_return_value_param() 190 state = get_state(my_id, sm->name, sm->sym); in param_has_filter_data() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/lib/libpp/ |
H A D | ppcall.c | 62 sym->flags |= SYM_NOTICED; in ppcall() 63 if (mac = sym->macro) in ppcall() 67 error(1, "%s: macro definition overrides assertion: use #%s ...", sym->name, sym->name); in ppcall() 68 if (sym->flags & SYM_DISABLED) in ppcall() 85 if (*sym->name != '_') in ppcall() 177 if (sym->flags & SYM_FUNCTION) in ppcall() 248 sym->flags |= SYM_ACTIVE; in ppcall() 401 sym->flags &= ~SYM_ACTIVE; in ppcall() 431 if (sym->flags & SYM_FUNCTION) in ppcall() 438 PUSH_MULTILINE(sym); in ppcall() [all …]
|
H A D | ppcontrol.c | 177 if (!sym->macro) sym->macro = newof(0, struct ppmacro, 1, 0); in macsym() 178 return sym; in macsym() 431 pp.in->symbol = sym ? sym : pprefmac(pp.token, REF_CREATE); in ppcontrol() 437 sym = 0; in ppcontrol() 1422 if (!(sym->flags & SYM_REDEFINE) && !sym->hidden) in ppcontrol() 1762 if (sym->macro && !(sym->flags & (SYM_ACTIVE|SYM_READONLY))) in ppcontrol() 1764 sym->hidden->macro = sym->macro; in ppcontrol() 1766 sym->hidden->flags = sym->flags; in ppcontrol() 1786 sym->macro = sym->hidden->macro; in ppcontrol() 1787 sym->flags = sym->hidden->flags; in ppcontrol() [all …]
|
/illumos-gate/usr/src/contrib/zlib/ |
H A D | inftrees.c | 37 unsigned sym; /* index of code symbols */ in inflate_table() local 105 for (sym = 0; sym < codes; sym++) in inflate_table() 106 count[lens[sym]]++; in inflate_table() 142 for (sym = 0; sym < codes; sym++) in inflate_table() 143 if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; in inflate_table() 213 if (work[sym] + 1U < match) { in inflate_table() 215 here.val = work[sym]; in inflate_table() 217 else if (work[sym] >= match) { in inflate_table() 219 here.val = base[work[sym] - match]; in inflate_table() 247 sym++; in inflate_table() [all …]
|
/illumos-gate/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_nm.c | 308 niip->nii_symp = sym; in nm_print() 342 if (sym->st_shndx == SHN_UNDEF) in nm_undef() 367 sym->st_value, opts, sym->st_size, name); in nm_asgn() 387 if (sym->st_shndx == SHN_UNDEF) in nm_cnt_undef() 401 (*sympp)->nm_sym = *sym; in nm_get_any() 707 GElf_Sym sym; in cmd_nm() local 817 GElf_Sym sym; in cmd_nmadd() local 841 bzero(&sym, sizeof (sym)); in cmd_nmadd() 858 argv[i].a_un.a_str, sym.st_value, sym.st_size); in cmd_nmadd() 868 GElf_Sym sym; in cmd_nmdel() local [all …]
|
/illumos-gate/usr/src/cmd/sgs/demo_rdb/common/ |
H A D | syms.c | 69 GElf_Sym sym; in str_map_sym() local 76 if (sym.st_name == 0) in str_map_sym() 78 if ((sym.st_shndx == SHN_UNDEF) || in str_map_sym() 81 *symptr = sym; in str_map_sym() 127 GElf_Sym sym; in addr_map_sym() local 156 if ((sym.st_name == 0) || (sym.st_shndx == SHN_UNDEF)) in addr_map_sym() 159 svalue = (ulong_t)sym.st_value; in addr_map_sym() 171 *lsymr = sym_swap(lsymr, &sym); in addr_map_sym() 174 *lsymr = sym; in addr_map_sym() 179 *symr = sym_swap(symr, &sym); in addr_map_sym() [all …]
|
/illumos-gate/usr/src/lib/libtecla/common/ |
H A D | keytab.c | 227 if(!sym) { in _kt_set_keybinding() 234 data = sym->data; in _kt_set_keybinding() 344 KeySym *sym; in _kt_set_keyfn() local 365 sym->keyseq = binary; in _kt_set_keyfn() 366 sym->nc = nc; in _kt_set_keyfn() 372 sym->binder = -1; in _kt_set_keyfn() 684 if(sym) { in _kt_set_action() 686 sym->data = data; in _kt_set_action() 808 if(sym->binder < 0) { in _kt_clear_bindings() 996 if(!sym) in _kt_lookup_action() [all …]
|