Home
last modified time | relevance | path

Searched refs:obj_state (Results 1 – 15 of 15) sorted by relevance

/titanic_41/usr/src/cmd/sgs/elfedit/common/
H A Delfedit_machelf.c57 get_symtab(elfedit_obj_state_t *obj_state, elfedit_section_t *auxsec) in get_symtab() argument
59 elfedit_symtab_t *symtab = obj_state->os_symtab; in get_symtab()
63 for (i = 0; i < obj_state->os_symtabnum; i++, symtab++) in get_symtab()
135 elfedit_obj_state_t *obj_state = NULL; in elfedit64_init_obj_state() local
224 obj_state = elfedit_malloc(MSG_INTL(MSG_ALLOC_OBJSTATE), in elfedit64_init_obj_state()
227 *obj_state = tstate; in elfedit64_init_obj_state()
230 obj_state->os_secarr = (elfedit_section_t *) in elfedit64_init_obj_state()
231 ((char *)obj_state + os_size); in elfedit64_init_obj_state()
232 if (obj_state->os_symtabnum == 0) in elfedit64_init_obj_state()
233 obj_state->os_symtab = NULL; in elfedit64_init_obj_state()
[all …]
H A Dutil_machelf.c60 elfedit_modified_ehdr(elfedit_obj_state_t *obj_state) in elfedit_modified_ehdr() argument
62 (void) elf_flagehdr(obj_state->os_elf, ELF_C_SET, ELF_F_DIRTY); in elfedit_modified_ehdr()
66 elfedit_modified_phdr(elfedit_obj_state_t *obj_state) in elfedit_modified_phdr() argument
68 (void) elf_flagphdr(obj_state->os_elf, ELF_C_SET, ELF_F_DIRTY); in elfedit_modified_phdr()
119 elfedit_name_to_shndx(elfedit_obj_state_t *obj_state, const char *shnam) in elfedit_name_to_shndx() argument
121 elfedit_section_t *sec = obj_state->os_secarr; in elfedit_name_to_shndx()
123 Word shnum = obj_state->os_shnum; in elfedit_name_to_shndx()
154 elfedit_type_to_shndx(elfedit_obj_state_t *obj_state, Word shtype) in elfedit_type_to_shndx() argument
157 elfedit_section_t *sec = obj_state->os_secarr; in elfedit_type_to_shndx()
159 Word shnum = obj_state->os_shnum; in elfedit_type_to_shndx()
[all …]
H A Dsys.c94 get_obj_state_info(void *obj_state, const char **file, int *fd, Elf **elf) in get_obj_state_info() argument
97 elfedit32_obj_state_t *s = (elfedit32_obj_state_t *)obj_state; in get_obj_state_info()
103 elfedit64_obj_state_t *s = (elfedit64_obj_state_t *)obj_state; in get_obj_state_info()
250 cmd_help(void *obj_state, int argc, const char *argv[]) in cmd_help() argument
484 cpl_help(void *obj_state, void *cpldata, int argc, const char *argv[], in cpl_help() argument
500 cmd_load(void *obj_state, int argc, const char *argv[]) in cmd_load() argument
535 cpl_load(void *obj_state, void *cpldata, int argc, const char *argv[], in cpl_load() argument
554 cmd_quit(void *obj_state, int argc, const char *argv[]) in cmd_quit() argument
584 get_obj_state_info(obj_state, &file, &fd, &elf); in cmd_quit()
587 free(obj_state); in cmd_quit()
[all …]
H A Delfconst.c377 *osabi = state.elf.obj_state.s32->os_ehdr->e_ident[EI_OSABI]; in init_libconv_strings()
378 *mach = state.elf.obj_state.s32->os_ehdr->e_machine; in init_libconv_strings()
380 *osabi = state.elf.obj_state.s64->os_ehdr->e_ident[EI_OSABI]; in init_libconv_strings()
381 *mach = state.elf.obj_state.s64->os_ehdr->e_machine; in init_libconv_strings()
440 cur_osabi = state.elf.obj_state.s32->os_ehdr->e_ident[EI_OSABI]; in invalidate_libconv_strings()
441 cur_mach = state.elf.obj_state.s32->os_ehdr->e_machine; in invalidate_libconv_strings()
443 cur_osabi = state.elf.obj_state.s64->os_ehdr->e_ident[EI_OSABI]; in invalidate_libconv_strings()
444 cur_mach = state.elf.obj_state.s64->os_ehdr->e_machine; in invalidate_libconv_strings()
H A D_elfedit.h196 } obj_state; member
H A Delfedit.c2183 cmd_ret = (* cmd_func)(state.elf.obj_state.s32, in dispatch_user_cmds()
2190 cmd_ret = (* cmd_func)(state.elf.obj_state.s64, in dispatch_user_cmds()
3364 (* cmdcpl_func)(state.elf.obj_state.s32, in cmd_match_fcn()
3371 (* cmdcpl_func)(state.elf.obj_state.s64, in cmd_match_fcn()
/titanic_41/usr/src/cmd/sgs/elfedit/modules/common/
H A Dphdr.c132 elfedit_obj_state_t *obj_state; member
157 process_args(elfedit_obj_state_t *obj_state, int argc, const char *argv[], in process_args() argument
164 argstate->obj_state = obj_state; in process_args()
222 argstate->obj_state->os_phnum - 1, NULL); in process_args()
226 Ehdr *ehdr = obj_state->os_ehdr; in process_args()
234 phdr = obj_state->os_phdr; in process_args()
235 for (i = 0; i < obj_state->os_phnum; i++, phdr++) { in process_args()
246 if (i == argstate->obj_state->os_phnum) in process_args()
270 locate_interp(elfedit_obj_state_t *obj_state, INTERP_STATE *interp) in locate_interp() argument
283 phnum = obj_state->os_phnum; in locate_interp()
[all …]
H A Dshdr.c122 elfedit_obj_state_t *obj_state; member
145 process_args(elfedit_obj_state_t *obj_state, int argc, const char *argv[], in process_args() argument
152 argstate->obj_state = obj_state; in process_args()
216 Ehdr *ehdr = argstate->obj_state->os_ehdr; in print_shdr()
219 elfedit_section_t *ref_sec = &argstate->obj_state->os_secarr[ndx]; in print_shdr()
234 elfedit_section_t *sec = &argstate->obj_state->os_secarr[ndx]; in print_shdr()
355 cmd_body(SHDR_CMD_T cmd, elfedit_obj_state_t *obj_state, in cmd_body() argument
358 Ehdr *ehdr = obj_state->os_ehdr; in cmd_body()
368 process_args(obj_state, argc, argv, cmd, &argstate); in cmd_body()
372 print_shdr(cmd, 0, &argstate, 0, obj_state->os_shnum, in cmd_body()
[all …]
H A Dehdr.c142 elfedit_obj_state_t *obj_state; member
162 process_args(elfedit_obj_state_t *obj_state, int argc, const char *argv[], in process_args() argument
169 argstate->obj_state = obj_state; in process_args()
275 ehdr = argstate->obj_state->os_ehdr; in print_ehdr()
290 argstate->obj_state->os_secarr[0].sec_shdr); in print_ehdr()
513 num = argstate->obj_state-> in print_ehdr()
535 num = argstate->obj_state-> in print_ehdr()
552 num = argstate->obj_state-> in print_ehdr()
638 cmd_body(EHDR_CMD_T cmd, elfedit_obj_state_t *obj_state, in cmd_body() argument
678 process_args(obj_state, argc, argv, &argstate); in cmd_body()
[all …]
H A Dstr.c113 elfedit_obj_state_t *obj_state; 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()
222 if (ndx < obj_state->os_shnum) in shndx_to_strtab()
224 obj_state->os_secarr[ndx].sec_shdr->sh_link; in shndx_to_strtab()
247 process_args(elfedit_obj_state_t *obj_state, int argc, const char *argv[], in process_args() argument
256 argstate->obj_state = obj_state; in process_args()
262 ndx = obj_state->os_ehdr->e_shstrndx; in process_args()
272 ndx = elfedit_name_to_shndx(obj_state, in process_args()
[all …]
H A Dsym.c173 elfedit_obj_state_t *obj_state; member
209 symstate->str.sec = elfedit_sec_getstr(argstate->obj_state, in symstate_add_str()
218 symstate->versym.sec = elfedit_sec_getversym(argstate->obj_state, in symstate_add_versym()
227 symstate->xshndx.sec = elfedit_sec_getxshndx(argstate->obj_state, in symstate_add_xshndx()
251 elfedit_obj_state_t *obj_state = argstate->obj_state; in dump_symtab() local
252 uchar_t osabi = obj_state->os_ehdr->e_ident[EI_OSABI]; in dump_symtab()
253 Half mach = obj_state->os_ehdr->e_machine; in dump_symtab()
283 shndx_name = elfedit_shndx_to_name(obj_state, shndx); in dump_symtab()
506 elfedit_shndx_to_name(argstate->obj_state, in print_symstate()
527 Half mach = argstate->obj_state->os_ehdr->e_machine; in print_symstate()
[all …]
H A Dcap.c122 elfedit_obj_state_t *obj_state; member
176 argstate->str.sec = elfedit_sec_getstr(argstate->obj_state, in argstate_add_str()
295 process_args(elfedit_obj_state_t *obj_state, int argc, const char *argv[], in process_args() argument
303 argstate->obj_state = obj_state; in process_args()
324 argstate->cap.sec = elfedit_sec_getcap(obj_state, &argstate->cap.data, in process_args()
465 argstate->obj_state->os_ehdr->e_machine); in print_cap()
494 argstate->obj_state->os_ehdr-> in print_cap()
505 argstate->obj_state->os_ehdr-> in print_cap()
513 argstate->obj_state->os_ehdr-> in print_cap()
521 argstate->obj_state->os_ehdr-> in print_cap()
[all …]
H A Ddyn.c127 elfedit_obj_state_t *obj_state; member
200 ehdr = argstate->obj_state->os_ehdr; in convert_dt_null()
230 process_args(elfedit_obj_state_t *obj_state, int argc, const char *argv[], in process_args() argument
237 argstate->obj_state = obj_state; in process_args()
261 argstate->dyn.sec = elfedit_sec_getdyn(obj_state, &argstate->dyn.data, in process_args()
263 argstate->strsec = elfedit_sec_getstr(obj_state, in process_args()
309 elfedit_test_osabi(argstate->obj_state, ELFOSABI_SOLARIS, 0); in print_dyn()
504 ehdr = argstate->obj_state->os_ehdr; in print_dyn()
570 Ehdr *ehdr = argstate->obj_state->os_ehdr; in print_dyn()
661 Ehdr *ehdr = argstate->obj_state->os_ehdr; in arg_to_index()
[all …]
H A Dsyminfo.c111 elfedit_obj_state_t *obj_state; member
155 process_args(elfedit_obj_state_t *obj_state, int argc, const char *argv[], in process_args() argument
162 argstate->obj_state = obj_state; in process_args()
189 argstate->syminfo.sec = elfedit_sec_getsyminfo(obj_state, in process_args()
222 argstate->sym.sec = elfedit_sec_getsymtab(argstate->obj_state, in argstate_add_sym()
233 argstate->str.sec = elfedit_sec_getstr(argstate->obj_state, in argstate_add_str()
242 argstate->dynamic.sec = elfedit_sec_getdyn(argstate->obj_state, in argstate_add_dynamic()
494 if (elfedit_test_osabi(argstate->obj_state, in needed_to_boundto()
542 argstate->obj_state->os_ehdr->e_ident[EI_OSABI], in needed_to_boundto()
543 argstate->obj_state->os_ehdr->e_machine, in needed_to_boundto()
[all …]
/titanic_41/usr/src/cmd/sgs/include/
H A Delfedit.h881 extern int elfedit32_dynstr_getpad(elfedit32_obj_state_t *obj_state,
883 extern int elfedit64_dynstr_getpad(elfedit64_obj_state_t *obj_state,
896 extern void elfedit32_modified_ehdr(elfedit32_obj_state_t *obj_state);
897 extern void elfedit64_modified_ehdr(elfedit64_obj_state_t *obj_state);
899 extern void elfedit32_modified_phdr(elfedit32_obj_state_t *obj_state);
900 extern void elfedit64_modified_phdr(elfedit64_obj_state_t *obj_state);
905 extern Elf32_Word elfedit32_name_to_shndx(elfedit32_obj_state_t *obj_state,
907 extern Elf64_Word elfedit64_name_to_shndx(elfedit64_obj_state_t *obj_state,
928 elfedit32_obj_state_t *obj_state, Elf32_Word shndx);
930 elfedit64_obj_state_t *obj_state, Elf64_Word shndx);
[all …]