Lines Matching refs:sym

155 	} sym;  member
210 symstate->sym.sec->sec_shdr->sh_link, 0); in symstate_add_str()
219 symstate->sym.sec, &symstate->versym.data, &symstate->versym.n); in symstate_add_versym()
228 symstate->sym.sec, &symstate->xshndx.data, &symstate->xshndx.n); in symstate_add_xshndx()
250 Sym *sym; in dump_symtab() local
257 symsec = symstate->sym.sec; in dump_symtab()
258 sym = symstate->sym.data + ndx; in dump_symtab()
273 for (; cnt-- > 0; ndx++, sym++) { in dump_symtab()
278 symname = elfedit_offset_to_str(strsec, sym->st_name, in dump_symtab()
280 shndx = sym->st_shndx; in dump_symtab()
285 sym, versym, 0, shndx_name, symname); in dump_symtab()
311 sym1 = &symstate1->sym.data[symstate1->ndx]; in all_same()
312 sym2 = &symstate2->sym.data[symstate2->ndx]; in all_same()
428 Sym *sym; in print_symstate() local
440 sym = symstate->sym.data; in print_symstate()
447 for (sym += ndx; cnt--; sym++) { in print_symstate()
448 value = ELF_ST_BIND(sym->st_info); in print_symstate()
463 for (sym += ndx; cnt-- > 0; sym++) in print_symstate()
465 EC_WORD(sym->st_info)); in print_symstate()
475 for (sym += ndx; cnt--; sym++) { in print_symstate()
478 sym->st_name, ELFEDIT_MSG_ERR, 0)); in print_symstate()
481 for (; cnt--; sym++) in print_symstate()
483 EC_WORD(sym->st_name)); in print_symstate()
488 for (sym += ndx; cnt-- > 0; sym++) in print_symstate()
490 EC_WORD(sym->st_other)); in print_symstate()
499 value = sym[ndx].st_shndx; in print_symstate()
520 for (sym += ndx; cnt--; sym++) in print_symstate()
522 sym->st_size); in print_symstate()
530 for (sym += ndx; cnt--; sym++) { in print_symstate()
531 value = ELF_ST_TYPE(sym->st_info); in print_symstate()
550 for (sym += ndx; cnt--; sym++) in print_symstate()
552 sym->st_value); in print_symstate()
559 for (sym += ndx; cnt--; sym++) { in print_symstate()
560 value = ELF_ST_VISIBILITY(sym->st_other); in print_symstate()
655 cnt = symstate->sym.n; in print_sym()
685 Sym *sym = &symstate->sym.data[symstate->ndx]; in cmd_body_set_st_bind() local
698 old_bind = ELF_ST_BIND(sym->st_info); in cmd_body_set_st_bind()
699 type = ELF_ST_TYPE(sym->st_info); in cmd_body_set_st_bind()
703 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_bind()
713 gbl_ndx = symstate->sym.sec->sec_shdr->sh_info; in cmd_body_set_st_bind()
714 symndx = symstate->sym.sec->sec_shndx; in cmd_body_set_st_bind()
718 EC_WORD(symndx), symstate->sym.sec->sec_name, in cmd_body_set_st_bind()
723 EC_WORD(symndx), symstate->sym.sec->sec_name, in cmd_body_set_st_bind()
727 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_bind()
733 sym->st_info = ELF_ST_INFO(bind, type); in cmd_body_set_st_bind()
743 Sym *sym = &symstate->sym.data[symstate->ndx]; in cmd_body_set_st_name() local
762 if (sym->st_name == str_offset) { in cmd_body_set_st_name()
764 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_name()
766 EC_WORD(sym->st_name)); in cmd_body_set_st_name()
772 if (symstate->sym.sec->sec_shdr->sh_type == SHT_DYNSYM) in cmd_body_set_st_name()
775 EC_WORD(symstate->sym.sec->sec_shndx), in cmd_body_set_st_name()
776 symstate->sym.sec->sec_name, in cmd_body_set_st_name()
780 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_name()
782 EC_WORD(sym->st_name), in cmd_body_set_st_name()
785 sym->st_name = str_offset; in cmd_body_set_st_name()
795 Sym *sym = &symstate->sym.data[symstate->ndx]; in cmd_body_set_st_shndx() local
854 shndx_chg = (sym->st_shndx != st_shndx); in cmd_body_set_st_shndx()
889 EC_WORD(symstate->sym.sec->sec_shndx), in cmd_body_set_st_shndx()
890 symstate->sym.sec->sec_name, EC_WORD(symstate->ndx), in cmd_body_set_st_shndx()
896 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_shndx()
899 sym->st_shndx), in cmd_body_set_st_shndx()
902 sym->st_shndx = st_shndx; in cmd_body_set_st_shndx()
905 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_shndx()
942 Sym *sym = &symstate->sym.data[symstate->ndx]; in cmd_body_set_st_type() local
950 bind = ELF_ST_BIND(sym->st_info); in cmd_body_set_st_type()
953 old_type = ELF_ST_TYPE(sym->st_info); in cmd_body_set_st_type()
957 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_type()
963 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_type()
970 sym->st_info = ELF_ST_INFO(bind, type); in cmd_body_set_st_type()
981 Sym *sym = &symstate->sym.data[symstate->ndx]; in cmd_body_set_st_visibility() local
982 uchar_t st_other = sym->st_other; in cmd_body_set_st_visibility()
996 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_visibility()
1002 symstate->sym.sec->sec_shndx, symstate->sym.sec->sec_name, in cmd_body_set_st_visibility()
1010 sym->st_other = st_other; in cmd_body_set_st_visibility()
1159 symstate->sym.sec = elfedit_sec_getsymtab(obj_state, 1, in process_args()
1160 symtab->symt_shndx, NULL, &symstate->sym.data, in process_args()
1161 &symstate->sym.n, &symtab); in process_args()
1168 symstate->sym.n - 1, NULL); in process_args()
1193 if (elfedit_name_to_symndx(symstate->sym.sec, in process_args()
1231 Sym *sym = &symstate->sym.data[symstate->ndx]; in symstate_cmd_body() local
1236 EC_WORD(symstate->sym.sec->sec_shndx), in symstate_cmd_body()
1237 symstate->sym.sec->sec_name, EC_WORD(symstate->ndx)); in symstate_cmd_body()
1256 if (sym->st_info == st_info) { in symstate_cmd_body()
1259 symstate->sym.sec->sec_shndx, in symstate_cmd_body()
1260 symstate->sym.sec->sec_name, in symstate_cmd_body()
1263 EC_WORD(sym->st_info)); in symstate_cmd_body()
1267 symstate->sym.sec->sec_shndx, in symstate_cmd_body()
1268 symstate->sym.sec->sec_name, in symstate_cmd_body()
1271 EC_WORD(sym->st_info), EC_WORD(st_info)); in symstate_cmd_body()
1273 sym->st_info = st_info; in symstate_cmd_body()
1288 if (sym->st_other == st_other) { in symstate_cmd_body()
1291 symstate->sym.sec->sec_shndx, in symstate_cmd_body()
1292 symstate->sym.sec->sec_name, in symstate_cmd_body()
1295 EC_WORD(sym->st_other)); in symstate_cmd_body()
1299 symstate->sym.sec->sec_shndx, in symstate_cmd_body()
1300 symstate->sym.sec->sec_name, in symstate_cmd_body()
1303 EC_WORD(sym->st_other), EC_WORD(st_other)); in symstate_cmd_body()
1305 sym->st_other = st_other; in symstate_cmd_body()
1318 if (sym->st_size == st_size) { in symstate_cmd_body()
1321 symstate->sym.sec->sec_shndx, in symstate_cmd_body()
1322 symstate->sym.sec->sec_name, in symstate_cmd_body()
1325 EC_XWORD(sym->st_size)); in symstate_cmd_body()
1329 symstate->sym.sec->sec_shndx, in symstate_cmd_body()
1330 symstate->sym.sec->sec_name, in symstate_cmd_body()
1333 EC_XWORD(sym->st_size), EC_XWORD(st_size)); in symstate_cmd_body()
1335 sym->st_size = st_size; in symstate_cmd_body()
1348 if (sym->st_value == st_value) { in symstate_cmd_body()
1351 symstate->sym.sec->sec_shndx, in symstate_cmd_body()
1352 symstate->sym.sec->sec_name, in symstate_cmd_body()
1355 EC_ADDR(sym->st_value)); in symstate_cmd_body()
1359 symstate->sym.sec->sec_shndx, in symstate_cmd_body()
1360 symstate->sym.sec->sec_name, in symstate_cmd_body()
1363 EC_ADDR(sym->st_value), in symstate_cmd_body()
1367 sym->st_value = st_value; in symstate_cmd_body()
1384 elfedit_modified_data(symstate->sym.sec); in symstate_cmd_body()