Lines Matching defs:elf_file

60 	(lseek64(fd, (off64_t)elf_file.shdr[(index)].sh_offset, SEEK_SET) != \
61 (off64_t)elf_file.shdr[(index)].sh_offset || \
62 dt_write(dtp, fd, (data), elf_file.shdr[(index)].sh_size) != \
63 elf_file.shdr[(index)].sh_size)
456 } elf_file;
473 bzero(&elf_file, sizeof (elf_file));
475 elf_file.ehdr.e_ident[EI_MAG0] = ELFMAG0;
476 elf_file.ehdr.e_ident[EI_MAG1] = ELFMAG1;
477 elf_file.ehdr.e_ident[EI_MAG2] = ELFMAG2;
478 elf_file.ehdr.e_ident[EI_MAG3] = ELFMAG3;
479 elf_file.ehdr.e_ident[EI_VERSION] = EV_CURRENT;
480 elf_file.ehdr.e_ident[EI_CLASS] = ELFCLASS32;
482 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2MSB;
484 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
486 elf_file.ehdr.e_type = ET_REL;
488 elf_file.ehdr.e_machine = EM_SPARC;
490 elf_file.ehdr.e_machine = EM_386;
492 elf_file.ehdr.e_version = EV_CURRENT;
493 elf_file.ehdr.e_shoff = sizeof (Elf32_Ehdr);
494 elf_file.ehdr.e_ehsize = sizeof (Elf32_Ehdr);
495 elf_file.ehdr.e_phentsize = sizeof (Elf32_Phdr);
496 elf_file.ehdr.e_shentsize = sizeof (Elf32_Shdr);
497 elf_file.ehdr.e_shnum = nshdr;
498 elf_file.ehdr.e_shstrndx = ESHDR_SHSTRTAB;
499 off = sizeof (elf_file) + nshdr * sizeof (Elf32_Shdr);
501 shp = &elf_file.shdr[ESHDR_SHSTRTAB];
509 shp = &elf_file.shdr[ESHDR_DOF];
518 shp = &elf_file.shdr[ESHDR_STRTAB];
527 shp = &elf_file.shdr[ESHDR_SYMTAB];
540 if (dt_write(dtp, fd, &elf_file,
541 sizeof (elf_file)) != sizeof (elf_file) ||
549 shp = &elf_file.shdr[ESHDR_REL];
564 if (dt_write(dtp, fd, &elf_file,
565 sizeof (elf_file)) != sizeof (elf_file) ||
593 } elf_file;
610 bzero(&elf_file, sizeof (elf_file));
612 elf_file.ehdr.e_ident[EI_MAG0] = ELFMAG0;
613 elf_file.ehdr.e_ident[EI_MAG1] = ELFMAG1;
614 elf_file.ehdr.e_ident[EI_MAG2] = ELFMAG2;
615 elf_file.ehdr.e_ident[EI_MAG3] = ELFMAG3;
616 elf_file.ehdr.e_ident[EI_VERSION] = EV_CURRENT;
617 elf_file.ehdr.e_ident[EI_CLASS] = ELFCLASS64;
619 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2MSB;
621 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
623 elf_file.ehdr.e_type = ET_REL;
625 elf_file.ehdr.e_machine = EM_SPARCV9;
627 elf_file.ehdr.e_machine = EM_AMD64;
629 elf_file.ehdr.e_version = EV_CURRENT;
630 elf_file.ehdr.e_shoff = sizeof (Elf64_Ehdr);
631 elf_file.ehdr.e_ehsize = sizeof (Elf64_Ehdr);
632 elf_file.ehdr.e_phentsize = sizeof (Elf64_Phdr);
633 elf_file.ehdr.e_shentsize = sizeof (Elf64_Shdr);
634 elf_file.ehdr.e_shnum = nshdr;
635 elf_file.ehdr.e_shstrndx = ESHDR_SHSTRTAB;
636 off = sizeof (elf_file) + nshdr * sizeof (Elf64_Shdr);
638 shp = &elf_file.shdr[ESHDR_SHSTRTAB];
646 shp = &elf_file.shdr[ESHDR_DOF];
655 shp = &elf_file.shdr[ESHDR_STRTAB];
664 shp = &elf_file.shdr[ESHDR_SYMTAB];
677 if (dt_write(dtp, fd, &elf_file,
678 sizeof (elf_file)) != sizeof (elf_file) ||
686 shp = &elf_file.shdr[ESHDR_REL];
697 if (dt_write(dtp, fd, &elf_file,
698 sizeof (elf_file)) != sizeof (elf_file) ||