OSDN Git Service

linux-user: Pass missing MAP_ANONYMOUS to target_mmap() call
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 12 Jul 2016 12:02:12 +0000 (13:02 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Wed, 21 Sep 2016 11:26:23 +0000 (14:26 +0300)
commit68754b442b756e8cb5f143b00937fb7330a51a81
treeb654f601e7e8b80e17bd49181a8c236a709f25a3
parent0cb581d6bdc5aa808ae1a9789d02657fe531cb39
linux-user: Pass missing MAP_ANONYMOUS to target_mmap() call

A target_mmap() call in load_elf_binary() was missing the MAP_ANONYMOUS
flag. (Spotted by Coverity, because target_mmap() will try to use
-1 as the filedescriptor in this case.)

This has never been noticed because the code in question is for
handling ancient SVr4 iBCS2 binaries.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/elfload.c