Lines Matching defs:idi
61 struct iodesc idi, ido;
64 if ((idi.fd = open(idi.fname = f1, O_RDONLY)) == -1)
65 err(1, "%s", idi.fname);
73 mk_data(&idi, &ido, kh,
107 xclose(&idi);
114 mk_data(const struct iodesc * idi, const struct iodesc * ido,
128 n = xread(idi, &hdr, sizeof(hdr), 0);
135 errx(1, "%s: Format not supported", idi->fname);
146 close(idi->fd);
156 e = fmt == F_ELF ? ld_elf(idi, &idp, kh, &hdr.ee) :
157 fmt == F_AOUT ? ld_aout(idi, &idp, kh, &hdr.ex) : -1;
165 errx(1, "%s: Invalid format", idi->fname);
175 ld_elf(const struct iodesc * idi, const struct iodesc * ido,
184 if (xread(idi, &p, sizeof(p),
203 xcopy(idi, ido, p.p_filesz, p.p_offset);
220 ld_aout(const struct iodesc * idi, const struct iodesc * ido,
226 xcopy(idi, ido, le32toh(a->a_text), N_TXTOFF(*a));
230 xcopy(idi, ido, le32toh(a->a_data), N_DATOFF(*a));