linux-user/elfload: Open core file after vma_init
commit106f8da6643634f141b39198576156a4c5bd6e60
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 27 Feb 2024 03:03:19 +0000 (26 17:03 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 29 Feb 2024 18:48:02 +0000 (29 08:48 -1000)
tree01ecfa4463dd9201f955da0e5830b4a336d5164d
parentccb6f3eee0f746961f95e9956fa20decd1f46da3
linux-user/elfload: Open core file after vma_init

Swap the ordering of vma_init and open.  This will be necessary
for further changes, and adjusts the error cleanup path.  Narrow
the scope of corefile, as the variable can be freed immediately
after use in open().

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/elfload.c