diff options
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 1b747d8738..4b7fd7ca8c 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1098,6 +1098,7 @@ int main(int argc, char **argv) /* NOTE: we need to init the CPU at this stage to get qemu_host_page_size */ env = cpu_init(); + global_env = env; if (elf_exec(filename, argv+optind, environ, regs, info) != 0) { printf("Error loading %s\n", filename); @@ -1120,8 +1121,6 @@ int main(int argc, char **argv) syscall_init(); signal_init(); - global_env = env; - /* build Task State */ memset(ts, 0, sizeof(TaskState)); env->opaque = ts; |