Lines Matching refs:outsec
69 OutSec_t outsec; in input() local
94 outsec.os_name = basename(file); in input()
95 outsec.os_type = SHT_PROGBITS; in input()
96 outsec.os_flags = SHF_ALLOC; in input()
97 outsec.os_ndx = ndx; in input()
114 if ((outsec.os_size = status.st_size) == 0) { in input()
120 if ((outsec.os_addr = mmap(0, outsec.os_size, PROT_READ, in input()
129 if (alist_append(&(odp->od_outsecs), &outsec, sizeof (OutSec_t), in input()
147 namesz = strlen(outsec.os_name) + 1; in input()
173 outsec.os_name = stdsecs->ss_name; in input()
174 outsec.os_type = stdsecs->ss_type; in input()
175 outsec.os_flags = stdsecs->ss_flags; in input()
176 outsec.os_ndx = ndx; in input()
177 outsec.os_size = 0; in input()
178 outsec.os_addr = 0; in input()
180 if (alist_append(&(odp->od_outsecs), &outsec, sizeof (OutSec_t), in input()
184 prog, outsec.os_name, strerror(err)); in input()
195 odp->od_shstrtabsz += (strlen(outsec.os_name) + 1); in input()
222 OutSec_t *outsec, *outsymtab, *outstrtab, *outshstrtab; in output() local
286 for (ALIST_TRAVERSE(odp->od_outsecs, off, outsec)) { in output()
293 prog, outsec->os_name, elf_errmsg(elf_errno())); in output()
298 prog, outsec->os_name, elf_errmsg(elf_errno())); in output()
305 shdr->sh_type = outsec->os_type; in output()
306 shdr->sh_flags = outsec->os_flags; in output()
310 prog, outsec->os_name, elf_errmsg(elf_errno())); in output()
322 data->d_buf = outsec->os_addr; in output()
324 data->d_size = outsec->os_size; in output()
346 if (strcmp(outsec->os_name, MSG_ORIG(MSG_SCN_STRTAB))) in output()
386 for (ALIST_TRAVERSE(odp->od_outsecs, off, outsec)) { in output()
390 if ((scn = elf_getscn(melf, outsec->os_ndx)) == NULL) { in output()
392 prog, outsec->os_name, elf_errmsg(elf_errno())); in output()
395 if ((outsec->os_shdr = shdr = elf_getshdr(scn)) == NULL) { in output()
397 prog, outsec->os_name, elf_errmsg(elf_errno())); in output()
400 if ((outsec->os_data = elf_getdata(scn, NULL)) == NULL) { in output()
402 prog, outsec->os_name, elf_errmsg(elf_errno())); in output()
414 outsymtab = outsec; in output()
415 symtab = (Sym *)outsec->os_data->d_buf; in output()
417 if (strcmp(outsec->os_name, MSG_ORIG(MSG_SCN_STRTAB))) { in output()
418 outshstrtab = outsec; in output()
419 shstrtab = (char *)outsec->os_data->d_buf; in output()
421 outstrtab = outsec; in output()
422 strtab = (char *)outsec->os_data->d_buf; in output()
468 for (ALIST_TRAVERSE(odp->od_outsecs, off, outsec)) { in output()
475 secsymtabent->st_shndx = outsec->os_ndx; in output()
483 outsec->os_shdr->sh_name = (shstrtabent - shstrtab); in output()
485 if (outsec->os_shdr->sh_type == SHT_PROGBITS) { in output()
491 len = strlen(outsec->os_name) + 1; in output()
492 (void) memcpy(shstrtabent, outsec->os_name, len); in output()
495 if (outsec->os_shdr->sh_type != SHT_PROGBITS) in output()
506 glbsymtabent->st_shndx = outsec->os_ndx; in output()
507 glbsymtabent->st_size = outsec->os_shdr->sh_size; in output()
515 (void) memcpy(strtabent, outsec->os_name, len); in output()
526 glbsymtabent->st_shndx = outsec->os_ndx; in output()
527 glbsymtabent->st_value = outsec->os_shdr->sh_size; in output()
534 (void) memcpy(strtabent, outsec->os_name, len); in output()