diff options
-rw-r--r-- | linux-user/elfload.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index e525901..c673101 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2235,7 +2235,8 @@ static uintptr_t pgb_find_hole(uintptr_t guest_loaddr, uintptr_t guest_size, brk = (uintptr_t)sbrk(0); if (!maps) { - return pgd_find_hole_fallback(guest_size, brk, align, offset); + ret = pgd_find_hole_fallback(guest_size, brk, align, offset); + return ret == -1 ? -1 : ret - guest_loaddr; } /* The first hole is before the first map entry. */ |