Lines Matching refs:fdlen
52 static int read_fd (int fd, const char *fname, off_t fdlen);
53 static int read_elf (Elf *elf, int fd, const char *fname, off_t fdlen);
192 off_t fdlen = (fstat_fail in main() local
194 if (fdlen > (off_t) min_len_bytes) in main()
202 result |= read_fd (fd, fname, fdlen); in main()
204 result |= read_elf (elf, fd, fname, fdlen); in main()
455 map_file (int fd, off_t start_off, off_t fdlen, size_t *map_sizep) in map_file() argument
468 size_t map_size = MIN ((off_t) mmap_max, fdlen); in map_file()
503 read_block_no_mmap (int fd, const char *fname, off_t from, off_t fdlen) in read_block_no_mmap() argument
511 while (fdlen > 0) in read_block_no_mmap()
514 MIN (fdlen, CHUNKSIZE))); in read_block_no_mmap()
530 fdlen -= n; in read_block_no_mmap()
565 read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to) in read_block() argument
571 elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size); in read_block()
590 assert ((off_t) min_len_bytes < fdlen); in read_block()
688 read_fd (int fd, const char *fname, off_t fdlen) in read_fd() argument
690 return read_block (fd, fname, fdlen, 0, fdlen); in read_fd()
695 read_elf (Elf *elf, int fd, const char *fname, off_t fdlen) in read_elf() argument
697 assert (fdlen >= 0); in read_elf()
705 return read_fd (fd, fname, fdlen); in read_elf()
718 if (shdr->sh_offset > (Elf64_Off) fdlen in read_elf()
719 || fdlen - shdr->sh_offset < shdr->sh_size) in read_elf()
733 result |= read_block (fd, fname, fdlen, shdr->sh_offset, in read_elf()