]> git.proxmox.com Git - qemu.git/commit
linux-user: Allocate the right amount of space for non-fixed file maps
authorRichard Henderson <rth@twiddle.net>
Fri, 1 Jun 2012 23:07:52 +0000 (16:07 -0700)
committerRichard Henderson <rth@twiddle.net>
Sat, 4 Aug 2012 16:37:49 +0000 (09:37 -0700)
commita5e7ee467c6b8cdfc0fc0f1958d5b0f479d76aaf
treef82b83c947077eb47c401ddb62f5658e3a5faaa7
parentafc8763f9db442abdbeb73a6458e27a0031c73b3
linux-user: Allocate the right amount of space for non-fixed file maps

If we let the kernel handle the implementation of mmap_find_vma,
via an anon mmap, we must use the size as indicated by the user
and not the size truncated to the filesize.

This happens often in ld.so, where we initially mmap the file to
the size of the text+data+bss to reserve an area, then mmap+fixed
over the top to properly handle data and bss.

Signed-off-by: Richard Henderson <rth@twiddle.net>
linux-user/mmap.c