Lines Matching defs:fd

60 	(lseek64(fd, (off64_t)elf_file.shdr[(index)].sh_offset, SEEK_SET) != \
62 dt_write(dtp, fd, (data), elf_file.shdr[(index)].sh_size) != \
451 dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, int fd)
540 if (dt_write(dtp, fd, &elf_file,
564 if (dt_write(dtp, fd, &elf_file,
588 dump_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, int fd)
677 if (dt_write(dtp, fd, &elf_file,
697 if (dt_write(dtp, fd, &elf_file,
981 dt_link_error(dtrace_hdl_t *dtp, Elf *elf, int fd, dt_link_pair_t *bufs,
994 if (fd >= 0)
995 (void) close(fd);
1014 int fd, i, ndx, eprobe, mod = 0;
1032 if ((fd = open64(obj, O_RDWR)) == -1) {
1033 return (dt_link_error(dtp, elf, fd, bufs,
1037 if ((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL) {
1038 return (dt_link_error(dtp, elf, fd, bufs,
1046 return (dt_link_error(dtp, elf, fd, bufs, "archives are not "
1050 return (dt_link_error(dtp, elf, fd, bufs,
1055 return (dt_link_error(dtp, elf, fd, bufs, "corrupt file: %s",
1079 return (dt_link_error(dtp, elf, fd, bufs,
1084 return (dt_link_error(dtp, elf, fd, bufs,
1094 return (dt_link_error(dtp, elf, fd, bufs,
1223 return (dt_link_error(dtp, elf, fd, bufs,
1407 return (dt_link_error(dtp, elf, fd, bufs,
1412 return (dt_link_error(dtp, elf, fd, bufs,
1425 return (dt_link_error(dtp, elf, fd, bufs,
1450 (void) close(fd);
1462 return (dt_link_error(dtp, elf, fd, bufs,
1472 int fd, status, i, cur;
1541 * processes as /dev/fd/<fd>.
1543 if ((fd = open64(file, O_RDWR | O_CREAT | O_TRUNC, 0666)) == -1) {
1554 if (dt_write(dtp, fd, dof, dof->dofh_filesz) < dof->dofh_filesz)
1557 if (close(fd) != 0 && ret == 0)
1580 status = dump_elf64(dtp, dof, fd);
1582 status = dump_elf32(dtp, dof, fd);
1584 if (status != 0 || lseek(fd, 0, SEEK_SET) != 0) {
1590 const char *fmt = "%s -o %s -r -Blocal -Breduce /dev/fd/%d %s";
1600 len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, fd,
1605 (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, fd, drti);
1614 (void) close(fd); /* release temporary file */
1630 (void) close(fd);