diff options
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/elfload.c | 3 | ||||
-rw-r--r-- | linux-user/mmap.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index d68f5a16ca..8b17c0e94b 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1478,8 +1478,7 @@ static void zero_bss(abi_ulong elf_bss, abi_ulong last_bss, int prot) host_start = (uintptr_t) g2h(elf_bss); host_end = (uintptr_t) g2h(last_bss); - host_map_start = (host_start + qemu_real_host_page_size - 1); - host_map_start &= -qemu_real_host_page_size; + host_map_start = REAL_HOST_PAGE_ALIGN(host_start); if (host_map_start < host_end) { void *p = mmap((void *)host_map_start, host_end - host_map_start, diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 5606bcd164..7b459d5100 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -444,9 +444,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, /* If so, truncate the file map at eof aligned with the hosts real pagesize. Additional anonymous maps will be created beyond EOF. */ - len = (sb.st_size - offset); - len += qemu_real_host_page_size - 1; - len &= ~(qemu_real_host_page_size - 1); + len = REAL_HOST_PAGE_ALIGN(sb.st_size - offset); } } |