Lines Matching defs:outsec

70 	OutSec_t	outsec;
95 outsec.os_name = basename(file);
96 outsec.os_type = SHT_PROGBITS;
97 outsec.os_flags = SHF_ALLOC;
98 outsec.os_ndx = ndx;
115 if ((outsec.os_size = status.st_size) == 0) {
121 if ((outsec.os_addr = mmap(0, outsec.os_size, PROT_READ,
130 if (alist_append(&(odp->od_outsecs), &outsec, sizeof (OutSec_t),
148 namesz = strlen(outsec.os_name) + 1;
174 outsec.os_name = stdsecs->ss_name;
175 outsec.os_type = stdsecs->ss_type;
176 outsec.os_flags = stdsecs->ss_flags;
177 outsec.os_ndx = ndx;
178 outsec.os_size = 0;
179 outsec.os_addr = 0;
181 if (alist_append(&(odp->od_outsecs), &outsec, sizeof (OutSec_t),
185 prog, outsec.os_name, strerror(err));
196 odp->od_shstrtabsz += (strlen(outsec.os_name) + 1);
223 OutSec_t *outsec, *outsymtab, *outstrtab, *outshstrtab;
287 for (ALIST_TRAVERSE(odp->od_outsecs, off, outsec)) {
294 prog, outsec->os_name, elf_errmsg(elf_errno()));
299 prog, outsec->os_name, elf_errmsg(elf_errno()));
306 shdr->sh_type = outsec->os_type;
307 shdr->sh_flags = outsec->os_flags;
311 prog, outsec->os_name, elf_errmsg(elf_errno()));
323 data->d_buf = outsec->os_addr;
325 data->d_size = outsec->os_size;
347 if (strcmp(outsec->os_name, MSG_ORIG(MSG_SCN_STRTAB)))
387 for (ALIST_TRAVERSE(odp->od_outsecs, off, outsec)) {
391 if ((scn = elf_getscn(melf, outsec->os_ndx)) == NULL) {
393 prog, outsec->os_name, elf_errmsg(elf_errno()));
396 if ((outsec->os_shdr = shdr = elf_getshdr(scn)) == NULL) {
398 prog, outsec->os_name, elf_errmsg(elf_errno()));
401 if ((outsec->os_data = elf_getdata(scn, NULL)) == NULL) {
403 prog, outsec->os_name, elf_errmsg(elf_errno()));
415 outsymtab = outsec;
416 symtab = (Sym *)outsec->os_data->d_buf;
418 if (strcmp(outsec->os_name, MSG_ORIG(MSG_SCN_STRTAB))) {
419 outshstrtab = outsec;
420 shstrtab = (char *)outsec->os_data->d_buf;
422 outstrtab = outsec;
423 strtab = (char *)outsec->os_data->d_buf;
469 for (ALIST_TRAVERSE(odp->od_outsecs, off, outsec)) {
476 secsymtabent->st_shndx = outsec->os_ndx;
484 outsec->os_shdr->sh_name = (shstrtabent - shstrtab);
486 if (outsec->os_shdr->sh_type == SHT_PROGBITS) {
492 len = strlen(outsec->os_name) + 1;
493 (void) memcpy(shstrtabent, outsec->os_name, len);
496 if (outsec->os_shdr->sh_type != SHT_PROGBITS)
507 glbsymtabent->st_shndx = outsec->os_ndx;
508 glbsymtabent->st_size = outsec->os_shdr->sh_size;
516 (void) memcpy(strtabent, outsec->os_name, len);
527 glbsymtabent->st_shndx = outsec->os_ndx;
528 glbsymtabent->st_value = outsec->os_shdr->sh_size;
535 (void) memcpy(strtabent, outsec->os_name, len);