diff options
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/elfload.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 816272aa32..547053c27a 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1842,6 +1842,8 @@ static void load_elf_image(const char *image_name, int image_fd, info->pt_dynamic_addr = 0; #endif + mmap_lock(); + /* Find the maximum size of the image and allocate an appropriate amount of memory to handle that. */ loaddr = -1, hiaddr = 0; @@ -2002,6 +2004,8 @@ static void load_elf_image(const char *image_name, int image_fd, load_symbols(ehdr, image_fd, load_bias); } + mmap_unlock(); + close(image_fd); return; |