Lines Matching refs:fildes

53 file_read_ar (int fildes, void *map_address, off_t offset, size_t maxsize,  in file_read_ar()  argument
59 elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent, in file_read_ar()
75 get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, in get_shnum() argument
171 if (unlikely (pread_retry (fildes, &size, sizeof (Elf32_Word), in get_shnum()
219 if (unlikely (pread_retry (fildes, &size, sizeof (Elf64_Word), in get_shnum()
248 file_read_elf (int fildes, void *map_address, unsigned char *e_ident, in file_read_elf() argument
264 size_t scncnt = get_shnum (map_address, e_ident, fildes, offset, maxsize); in file_read_elf()
282 Elf *elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent, in file_read_elf()
494 __libelf_read_mmaped_file (int fildes, void *map_address, off_t offset, in __libelf_read_mmaped_file() argument
509 return file_read_elf (fildes, map_address, e_ident, offset, maxsize, in __libelf_read_mmaped_file()
513 return file_read_ar (fildes, map_address, offset, maxsize, cmd, parent); in __libelf_read_mmaped_file()
521 return allocate_elf (fildes, map_address, offset, maxsize, cmd, parent, in __libelf_read_mmaped_file()
527 read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd, in read_unmmaped_file() argument
548 ssize_t nread = pread_retry (fildes, mem.header, in read_unmmaped_file()
566 return file_read_ar (fildes, NULL, offset, maxsize, cmd, parent); in read_unmmaped_file()
572 return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd, in read_unmmaped_file()
582 return allocate_elf (fildes, NULL, offset, maxsize, cmd, parent, in read_unmmaped_file()
589 read_file (int fildes, off_t offset, size_t maxsize, in read_file() argument
607 if (fstat (fildes, &st) == 0 in read_file()
620 fildes, offset); in read_file()
639 struct Elf *result = __libelf_read_mmaped_file (fildes, map_address, in read_file()
658 return read_unmmaped_file (fildes, offset, maxsize, cmd, parent); in read_file()
686 if (unlikely (pread_retry (elf->fildes, &hdrm, sizeof (hdrm), in read_long_names()
722 if (unlikely ((size_t) pread_retry (elf->fildes, newp, len, in read_long_names()
795 if (unlikely (pread_retry (elf->fildes, ar_hdr, sizeof (struct ar_hdr),
941 dup_elf (int fildes, Elf_Cmd cmd, Elf *ref) in dup_elf() argument
945 if (fildes == -1) in dup_elf()
947 fildes = ref->fildes; in dup_elf()
950 else if (unlikely (ref->fildes != -1 && fildes != ref->fildes)) in dup_elf()
988 result = read_file (fildes, ref->state.ar.offset + sizeof (struct ar_hdr), in dup_elf()
1032 elf_begin (fildes, cmd, ref) in elf_begin() argument
1033 int fildes; in elf_begin()
1049 else if (unlikely (fcntl (fildes, F_GETFL) == -1 && errno == EBADF))
1066 return dup_elf (fildes, cmd, ref);
1092 retval = read_file (fildes, 0, ~((size_t) 0), cmd, NULL);
1114 retval = read_file (fildes, 0, ~((size_t) 0), cmd, NULL);
1120 retval = write_file (fildes, cmd);