Lines Matching full:maxsize
40 file_read_ar (int fildes, void *map_address, off_t offset, size_t maxsize,
46 elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
63 size_t maxsize)
114 if (offset + ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
150 if (offset + ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
186 file_read_elf (int fildes, void *map_address, off_t offset, size_t maxsize,
222 scncnt = get_shnum (map_address, e_ident, fildes, offset, maxsize);
228 elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
420 size_t maxsize, Elf_Cmd cmd, Elf *parent)
429 kind = determine_kind (map_address + offset, maxsize);
434 return file_read_elf (fildes, map_address, offset, maxsize, cmd, parent);
437 return file_read_ar (fildes, map_address, offset, maxsize, cmd, parent);
445 return allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
451 read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd,
466 nread = pread (fildes, header, MIN (MAX (EI_NIDENT, SARMAG), maxsize),
479 return file_read_ar (fildes, NULL, offset, maxsize, cmd, parent);
483 if (maxsize >= (header[EI_CLASS] == ELFCLASS32
485 return file_read_elf (fildes, NULL, offset, maxsize, cmd, parent);
494 return allocate_elf (fildes, NULL, offset, maxsize, cmd, parent,
501 read_file (int fildes, off_t offset, size_t maxsize,
513 if (maxsize == ~((size_t) 0))
522 maxsize = (size_t) st.st_size;
526 map_address = mmap (NULL, maxsize, (cmd == ELF_C_READ_MMAP
539 assert (maxsize != ~((size_t) 0));
550 result = __libelf_read_mmaped_file (fildes, map_address, offset, maxsize,
558 munmap (map_address, maxsize);
568 return read_unmmaped_file (fildes, offset, maxsize, cmd, parent);