Lines Matching refs:fd

97 	int fd;  in nlist()  local
107 if ((fd = open(name, 0)) < 0) in nlist()
109 if (read(fd, magic_buf, (size_t)EI_NIDENT) == -1) { in nlist()
110 (void) close(fd); in nlist()
114 if (lseek(fd, 0L, 0) == -1L) { /* rewind to beginning of object file */ in nlist()
115 (void) close(fd); in nlist()
125 (void) close(fd); in nlist()
130 return (_elf_nlist(fd, list)); in nlist()
134 return (_coff_nlist(fd, list)); in nlist()
141 _elf_nlist(int fd, struct nlist *list) in _elf_nlist() argument
157 return (end_elf_job(fd)); in _elf_nlist()
164 if ((edata = elf_read(fd, 0L, elf32_fsize(ELF_T_EHDR, 1, fvers), in _elf_nlist()
166 return (end_elf_job(fd)); in _elf_nlist()
173 return (end_elf_job(fd)); in _elf_nlist()
176 if ((secdata = elf_read(fd, (long)ehdr->e_shoff, in _elf_nlist()
182 return (end_elf_job(fd)); in _elf_nlist()
197 return (end_elf_job(fd)); in _elf_nlist()
200 if ((symdata = elf_read(fd, (long)symhdr->sh_offset, in _elf_nlist()
208 return (end_elf_job(fd)); in _elf_nlist()
222 return (end_elf_job(fd)); in _elf_nlist()
225 if ((strdata = elf_read(fd, strhdr->sh_offset, strhdr->sh_size, in _elf_nlist()
233 return (end_elf_job(fd)); in _elf_nlist()
253 return (end_elf_job(fd)); in _elf_nlist()
274 (void) close(fd); in _elf_nlist()
294 elf_read(int fd, long offset, size_t size, size_t memsize, Elf_Type dtype) in elf_read() argument
318 if (lseek(fd, offset, 0L) == -1) { in elf_read()
324 if (read(fd, p, size) != size) { in elf_read()
348 end_elf_job(int fd) in end_elf_job() argument
350 (void) close(fd); in end_elf_job()
356 _coff_nlist(int fd, struct nlist *list) in _coff_nlist() argument
371 if (read(fd, (char *)&buf, bufsiz) == -1) { in _coff_nlist()
372 (void) close(fd); in _coff_nlist()
377 (void) close(fd); in _coff_nlist()
381 if (lseek(fd, (long)sa, 0) == -1L) { in _coff_nlist()
382 (void) close(fd); in _coff_nlist()
393 if (sym_read(fd, &sym, SYMESZ) == -1) { in _coff_nlist()
394 sym_close(fd); in _coff_nlist()
417 long home = lseek(fd, 0L, 1); in _coff_nlist()
419 sym_close(fd); in _coff_nlist()
422 if (lseek(fd, buf.f_symptr + in _coff_nlist()
424 read(fd, (char *)&strtablen, in _coff_nlist()
429 read(fd, strtab + sizeof (long), in _coff_nlist()
433 lseek(fd, home, 0) == -1) { in _coff_nlist()
434 (void) lseek(fd, home, 0); in _coff_nlist()
435 sym_close(fd); in _coff_nlist()
443 sym_close(fd); in _coff_nlist()
471 sym_close(fd); in _coff_nlist()
479 sym_close(int fd) in sym_close() argument
484 (void) close(fd); in sym_close()
489 sym_read(int fd, struct syment *sym, int size) in sym_read() argument
493 if ((where = lseek(fd, 0L, 1)) == -1L) { in sym_read()
494 sym_close(fd); in sym_read()
499 if (fill_sym_buf(fd, size) == -1) in sym_read()
506 if (fill_sym_buf(fd, size) == -1) in sym_read()
509 if ((lseek(fd, where + SYMESZ + (AUXESZ * sym->n_numaux), 0)) == -1L) { in sym_read()
510 sym_close(fd); in sym_read()
521 fill_sym_buf(int fd, int size) in fill_sym_buf() argument
523 if ((num_in_buf = read(fd, sym_buf, size * SPACE)) == -1) in fill_sym_buf()