Lines Matching refs:tstate
135 elfedit_obj_state_t tstate; in elfedit64_init_obj_state() local
141 tstate.os_file = file; in elfedit64_init_obj_state()
142 tstate.os_fd = fd; in elfedit64_init_obj_state()
143 tstate.os_elf = elf; in elfedit64_init_obj_state()
144 tstate.os_dynndx = SHN_UNDEF; in elfedit64_init_obj_state()
145 tstate.os_symtabnum = 0; in elfedit64_init_obj_state()
147 LIBELF(tstate.os_ehdr = elf_getehdr(tstate.os_elf), in elfedit64_init_obj_state()
151 if (elf_getphdrnum(tstate.os_elf, &tstate.os_phnum) == -1) in elfedit64_init_obj_state()
153 if (tstate.os_phnum > 0) { in elfedit64_init_obj_state()
154 LIBELF((tstate.os_phdr = elf_getphdr(tstate.os_elf)), in elfedit64_init_obj_state()
157 tstate.os_phdr = NULL; in elfedit64_init_obj_state()
160 if (elf_getshdrnum(tstate.os_elf, &tstate.os_shnum) == -1) in elfedit64_init_obj_state()
167 if (elf_getshdrstrndx(tstate.os_elf, &tstate.os_shstrndx) == -1) in elfedit64_init_obj_state()
169 LIBELF((scn = elf_getscn(tstate.os_elf, tstate.os_shstrndx)), in elfedit64_init_obj_state()
180 (scn = elf_nextscn(tstate.os_elf, scn)) != NULL; ndx++) { in elfedit64_init_obj_state()
188 tstate.os_dynndx = ndx; in elfedit64_init_obj_state()
194 if (symtabndx_size <= tstate.os_symtabnum) { in elfedit64_init_obj_state()
202 symtabndx[tstate.os_symtabnum++] = ndx; in elfedit64_init_obj_state()
221 os_size = S_DROUND(sizeof (tstate)); in elfedit64_init_obj_state()
222 secarr_size = (tstate.os_shnum * sizeof (elfedit_section_t)); in elfedit64_init_obj_state()
224 len = strlen(tstate.os_file) + 1; in elfedit64_init_obj_state()
227 (tstate.os_symtabnum * sizeof (elfedit_symtab_t)) + len); in elfedit64_init_obj_state()
228 *obj_state = tstate; in elfedit64_init_obj_state()
240 (char *)(obj_state->os_symtab + tstate.os_symtabnum); in elfedit64_init_obj_state()
241 (void) strncpy((char *)obj_state->os_file, tstate.os_file, len); in elfedit64_init_obj_state()
251 LIBELF(scn = elf_getscn(tstate.os_elf, 0), in elfedit64_init_obj_state()
268 (scn = elf_nextscn(tstate.os_elf, scn)) != NULL; ndx++, _cache++) { in elfedit64_init_obj_state()
450 (void) close(tstate.os_fd); in elfedit64_init_obj_state()
451 elfedit_elferr(tstate.os_file, libelf_fail_name); in elfedit64_init_obj_state()