• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/cddl/contrib/opensolaris/lib/libdtrace/common/

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)
472 } elf_file;
489 bzero(&elf_file, sizeof (elf_file));
491 elf_file.ehdr.e_ident[EI_MAG0] = ELFMAG0;
492 elf_file.ehdr.e_ident[EI_MAG1] = ELFMAG1;
493 elf_file.ehdr.e_ident[EI_MAG2] = ELFMAG2;
494 elf_file.ehdr.e_ident[EI_MAG3] = ELFMAG3;
495 elf_file.ehdr.e_ident[EI_VERSION] = EV_CURRENT;
496 elf_file.ehdr.e_ident[EI_CLASS] = ELFCLASS32;
498 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2MSB;
500 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
502 elf_file.ehdr.e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
503 elf_file.ehdr.e_type = ET_REL;
505 elf_file.ehdr.e_machine = EM_ARM;
507 elf_file.ehdr.e_machine = EM_MIPS;
509 elf_file.ehdr.e_machine = EM_PPC;
511 elf_file.ehdr.e_machine = EM_386;
513 elf_file.ehdr.e_machine = EM_AARCH64;
515 elf_file.ehdr.e_version = EV_CURRENT;
516 elf_file.ehdr.e_shoff = sizeof (Elf32_Ehdr);
517 elf_file.ehdr.e_ehsize = sizeof (Elf32_Ehdr);
518 elf_file.ehdr.e_phentsize = sizeof (Elf32_Phdr);
519 elf_file.ehdr.e_shentsize = sizeof (Elf32_Shdr);
520 elf_file.ehdr.e_shnum = nshdr;
521 elf_file.ehdr.e_shstrndx = ESHDR_SHSTRTAB;
522 off = sizeof (elf_file) + nshdr * sizeof (Elf32_Shdr);
524 shp = &elf_file.shdr[ESHDR_SHSTRTAB];
532 shp = &elf_file.shdr[ESHDR_DOF];
541 shp = &elf_file.shdr[ESHDR_STRTAB];
550 shp = &elf_file.shdr[ESHDR_SYMTAB];
563 if (dt_write(dtp, fd, &elf_file,
564 sizeof (elf_file)) != sizeof (elf_file) ||
572 shp = &elf_file.shdr[ESHDR_REL];
583 if (dt_write(dtp, fd, &elf_file,
584 sizeof (elf_file)) != sizeof (elf_file) ||
612 } elf_file;
629 bzero(&elf_file, sizeof (elf_file));
631 elf_file.ehdr.e_ident[EI_MAG0] = ELFMAG0;
632 elf_file.ehdr.e_ident[EI_MAG1] = ELFMAG1;
633 elf_file.ehdr.e_ident[EI_MAG2] = ELFMAG2;
634 elf_file.ehdr.e_ident[EI_MAG3] = ELFMAG3;
635 elf_file.ehdr.e_ident[EI_VERSION] = EV_CURRENT;
636 elf_file.ehdr.e_ident[EI_CLASS] = ELFCLASS64;
638 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2MSB;
640 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
642 elf_file.ehdr.e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
643 elf_file.ehdr.e_type = ET_REL;
645 elf_file.ehdr.e_machine = EM_ARM;
647 elf_file.ehdr.e_machine = EM_MIPS;
649 elf_file.ehdr.e_machine = EM_PPC64;
651 elf_file.ehdr.e_machine = EM_AMD64;
653 elf_file.ehdr.e_machine = EM_AARCH64;
655 elf_file.ehdr.e_version = EV_CURRENT;
656 elf_file.ehdr.e_shoff = sizeof (Elf64_Ehdr);
657 elf_file.ehdr.e_ehsize = sizeof (Elf64_Ehdr);
658 elf_file.ehdr.e_phentsize = sizeof (Elf64_Phdr);
659 elf_file.ehdr.e_shentsize = sizeof (Elf64_Shdr);
660 elf_file.ehdr.e_shnum = nshdr;
661 elf_file.ehdr.e_shstrndx = ESHDR_SHSTRTAB;
662 off = sizeof (elf_file) + nshdr * sizeof (Elf64_Shdr);
664 shp = &elf_file.shdr[ESHDR_SHSTRTAB];
672 shp = &elf_file.shdr[ESHDR_DOF];
681 shp = &elf_file.shdr[ESHDR_STRTAB];
690 shp = &elf_file.shdr[ESHDR_SYMTAB];
703 if (dt_write(dtp, fd, &elf_file,
704 sizeof (elf_file)) != sizeof (elf_file) ||
712 shp = &elf_file.shdr[ESHDR_REL];
723 if (dt_write(dtp, fd, &elf_file,
724 sizeof (elf_file)) != sizeof (elf_file) ||