Lines Matching refs:elfmap
136 static unsigned char *elfmap; variable
213 if (elfmap != NULL && elfmap != MAP_FAILED) in main()
214 munmap (elfmap, elfmap_size); in main()
215 elfmap = NULL; in main()
565 if (elfmap == NULL) in read_block()
569 elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size); in read_block()
571 if (unlikely (elfmap == MAP_FAILED)) in read_block()
576 if (unlikely (elfmap == MAP_FAILED)) in read_block()
597 if (mmap (elfmap, elfmap_size, PROT_READ, in read_block()
601 elfmap_base = elfmap; in read_block()
620 size_t read_now = elfmap_size - (elfmap_base - elfmap); in read_block()
625 assert (elfmap == elfmap_base in read_block()
626 || (elfmap_base - elfmap in read_block()
628 if (elfmap == elfmap_base) in read_block()
635 if (unlikely (mprotect (elfmap, keep_area, PROT_READ | PROT_WRITE) in read_block()
639 elfmap_base = elfmap + keep_area; in read_block()
654 assert ((elfmap_size - (elfmap_base - elfmap)) % bytes_per_char in read_block()
657 (ptrdiff_t) elfmap_size - (elfmap_base - elfmap)); in read_block()
737 if (elfmap != NULL && elfmap != MAP_FAILED) in read_elf()
738 munmap (elfmap, elfmap_size); in read_elf()
739 elfmap = NULL; in read_elf()