Home | History | Annotate | Download | only in libelf

Lines Matching full:maxsize

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,
97 size_t maxsize)
168 if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
205 if (ehdr.e32->e_shoff > maxsize
206 || maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr) * result)
216 if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
256 if (ehdr.e64->e_shoff > maxsize
257 || maxsize - ehdr.e64->e_shoff < sizeof (Elf64_Shdr) * result)
268 off_t offset, size_t maxsize, Elf_Cmd cmd, Elf *parent)
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,
339 if (likely (elf->state.elf32.shdr[cnt].sh_offset < maxsize)
340 && likely (maxsize - elf->state.elf32.shdr[cnt].sh_offset
425 if (likely (elf->state.elf64.shdr[cnt].sh_offset < maxsize)
426 && likely (maxsize - elf->state.elf64.shdr[cnt].sh_offset
490 size_t maxsize, Elf_Cmd cmd, Elf *parent)
499 Elf_Kind kind = determine_kind (e_ident, maxsize);
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,
545 maxsize),
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,
598 if (maxsize == ~((size_t) 0))
607 maxsize = (size_t) st.st_size;
611 map_address = mmap (NULL, maxsize, (cmd == ELF_C_READ_MMAP
625 assert (maxsize != ~((size_t) 0));
637 offset, maxsize, cmd,
645 munmap (map_address, maxsize);
655 return read_unmmaped_file (fildes, offset, maxsize, cmd, parent);