Home | History | Annotate | Download | only in libelf

Lines Matching refs:maxsize

73 file_read_ar (int fildes, void *map_address, off_t offset, size_t maxsize,
79 elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
96 size_t maxsize)
167 if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
204 if (ehdr.e32->e_shoff > maxsize
205 || maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr) * result)
215 if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
255 if (ehdr.e64->e_shoff > maxsize
256 || maxsize - ehdr.e64->e_shoff < sizeof (Elf64_Shdr) * result)
267 off_t offset, size_t maxsize, Elf_Cmd cmd, Elf *parent)
282 size_t scncnt = get_shnum (map_address, e_ident, fildes, offset, maxsize);
288 Elf *elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
484 size_t maxsize, Elf_Cmd cmd, Elf *parent)
493 Elf_Kind kind = determine_kind (e_ident, maxsize);
498 return file_read_elf (fildes, map_address, e_ident, offset, maxsize,
502 return file_read_ar (fildes, map_address, offset, maxsize, cmd, parent);
510 return allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
516 read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd,
539 maxsize),
552 return file_read_ar (fildes, NULL, offset, maxsize, cmd, parent);
558 return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd,
568 return allocate_elf (fildes, NULL, offset, maxsize, cmd, parent,
575 read_file (int fildes, off_t offset, size_t maxsize,
592 if (maxsize == ~((size_t) 0))
601 maxsize = (size_t) st.st_size;
605 map_address = mmap (NULL, maxsize, (cmd == ELF_C_READ_MMAP
619 assert (maxsize != ~((size_t) 0));
631 offset, maxsize, cmd,
639 munmap (map_address, maxsize);
649 return read_unmmaped_file (fildes, offset, maxsize, cmd, parent);