aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/elfload.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 04c28cbb9e..4961e6119e 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -2580,9 +2580,9 @@ static void load_elf_image(const char *image_name, int image_fd,
if (vaddr_ef > info->end_data) {
info->end_data = vaddr_ef;
}
- if (vaddr_em > info->brk) {
- info->brk = vaddr_em;
- }
+ }
+ if (vaddr_em > info->brk) {
+ info->brk = vaddr_em;
}
} else if (eppnt->p_type == PT_INTERP && pinterp_name) {
char *interp_name;
@@ -2637,7 +2637,6 @@ static void load_elf_image(const char *image_name, int image_fd,
if (info->end_data == 0) {
info->start_data = info->end_code;
info->end_data = info->end_code;
- info->brk = info->end_code;
}
if (qemu_log_enabled()) {