Home | History | Annotate | Download | only in libelf

Lines Matching refs:fildes

74 file_read_ar (int fildes, void *map_address, off_t offset, size_t maxsize,
80 elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
96 get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset,
191 if (unlikely (pread_retry (fildes, &size, sizeof (Elf32_Word),
238 if (unlikely (pread_retry (fildes, &size, sizeof (Elf64_Word),
267 file_read_elf (int fildes, void *map_address, unsigned char *e_ident,
283 size_t scncnt = get_shnum (map_address, e_ident, fildes, offset, maxsize);
292 Elf *elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
489 __libelf_read_mmaped_file (int fildes, void *map_address, off_t offset,
504 return file_read_elf (fildes, map_address, e_ident, offset, maxsize,
508 return file_read_ar (fildes, map_address, offset, maxsize, cmd, parent);
516 return allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
522 read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd,
543 ssize_t nread = pread_retry (fildes, mem.header,
548 /* We cannot even read the head of the file. Maybe FILDES is associated
558 return file_read_ar (fildes, NULL, offset, maxsize, cmd, parent);
564 return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd,
574 return allocate_elf (fildes, NULL, offset, maxsize, cmd, parent,
581 read_file (int fildes, off_t offset, size_t maxsize,
604 if (fstat (fildes, &st) == 0
617 fildes, offset);
636 struct Elf *result = __libelf_read_mmaped_file (fildes, map_address,
655 return read_unmmaped_file (fildes, offset, maxsize, cmd, parent);
682 if (unlikely (pread_retry (elf->fildes, &hdrm, sizeof (hdrm),
714 if (unlikely ((size_t) pread_retry (elf->fildes, newp, len,
780 if (unlikely (pread_retry (elf->fildes, ar_hdr, sizeof (struct ar_hdr),
916 dup_elf (int fildes, Elf_Cmd cmd, Elf *ref)
920 if (fildes == -1)
922 fildes = ref->fildes;
925 else if (unlikely (ref->fildes != -1 && fildes != ref->fildes))
963 result = read_file (fildes, ref->state.ar.offset + sizeof (struct ar_hdr),
1005 /* Return a descriptor for the file belonging to FILDES. */
1007 elf_begin (fildes, cmd, ref)
1008 int fildes;
1024 else if (unlikely (fcntl (fildes, F_GETFL) == -1 && errno == EBADF))
1041 return dup_elf (fildes, cmd, ref);
1067 retval = read_file (fildes, 0, ~((size_t) 0), cmd, NULL);
1089 retval = read_file (fildes, 0, ~((size_t) 0), cmd, NULL);
1095 retval = write_file (fildes, cmd);