Lines Matching defs:obj_state

113 	elfedit_obj_state_t	*obj_state;
199 shndx_to_strtab(elfedit_obj_state_t *obj_state, Word ndx)
206 if (ndx < obj_state->os_shnum) {
207 Shdr *shdr = obj_state->os_secarr[ndx].sec_shdr;
222 if (ndx < obj_state->os_shnum)
224 obj_state->os_secarr[ndx].sec_shdr->sh_link;
238 * obj_state, argc, argv - Standard command arguments
247 process_args(elfedit_obj_state_t *obj_state, int argc, const char *argv[],
256 argstate->obj_state = obj_state;
262 ndx = obj_state->os_ehdr->e_shstrndx;
272 ndx = elfedit_name_to_shndx(obj_state,
281 ndx = elfedit_type_to_shndx(obj_state,
330 argstate->str.sec = elfedit_sec_get(obj_state, ndx);
338 ndx = shndx_to_strtab(obj_state, ndx);
345 argstate->str.sec = elfedit_sec_getstr(obj_state, ndx, 1);
357 if (obj_state->os_dynndx != SHN_UNDEF) {
359 &obj_state->os_secarr[obj_state->os_dynndx];
364 argstate->dyn.sec = elfedit_sec_getdyn(obj_state,
366 (void) elfedit_dynstr_getpad(obj_state, dynsec,
662 * obj_state, argc, argv - Standard command arguments
665 cmd_body(STR_CMD_T cmd, elfedit_obj_state_t *obj_state,
672 process_args(obj_state, argc, argv, cmd, &argstate, &print_only);
691 argstate.str.ndx = elfedit_strtab_insert(obj_state,
748 cpl_sh_opt(elfedit_obj_state_t *obj_state, void *cpldata, int argc,
766 if (obj_state == NULL) { /* No object available */
780 if (obj_state == NULL) /* No object available */
787 sec = obj_state->os_secarr;
788 for (ndx = 0; ndx < obj_state->os_shnum; ndx++, sec++) {
818 cpl_sec_str(elfedit_obj_state_t *obj_state, void *cpldata, int argc,
827 cpl_sh_opt(obj_state, cpldata, argc, argv, num_opt);
830 if (obj_state == NULL)
844 strtab_ndx = obj_state->os_ehdr->e_shstrndx;
854 for (i = 1; i < obj_state->os_shnum; i++)
855 if (strcmp(obj_state->os_secarr[i].
875 for (i = 1; i < obj_state->os_shnum; i++)
876 if (obj_state->os_secarr[i].sec_shdr->
890 strtab_ndx = shndx_to_strtab(obj_state, strtab_ndx);
891 if ((strtab_ndx >= obj_state->os_shnum) ||
892 (obj_state->os_secarr[strtab_ndx].sec_shdr->sh_type != SHT_STRTAB))
894 sec = &obj_state->os_secarr[strtab_ndx];
911 cmd_dump(elfedit_obj_state_t *obj_state, int argc, const char *argv[])
913 return (cmd_body(STR_CMD_T_DUMP, obj_state, argc, argv));
917 cmd_set(elfedit_obj_state_t *obj_state, int argc, const char *argv[])
919 return (cmd_body(STR_CMD_T_SET, obj_state, argc, argv));
923 cmd_add(elfedit_obj_state_t *obj_state, int argc, const char *argv[])
925 return (cmd_body(STR_CMD_T_ADD, obj_state, argc, argv));
929 cmd_zero(elfedit_obj_state_t *obj_state, int argc, const char *argv[])
931 return (cmd_body(STR_CMD_T_ZERO, obj_state, argc, argv));