OSDN Git Service

linux-user: Clean up arg_start/arg_end confusion
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 27 Apr 2022 02:51:29 +0000 (19:51 -0700)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 23 May 2022 06:15:19 +0000 (08:15 +0200)
commit60f1c8017a2b137013a8ae83911d74700f692425
treed463d93eeaf5b40c38b275a9940d0bb618900e35
parent3757b0d08b399c609954cf57f273b1167e5d7a8d
linux-user: Clean up arg_start/arg_end confusion

We had two sets of variables: arg_start/arg_end, and
arg_strings/env_strings.  In linuxload.c, we set the
first pair to the bounds of the argv strings, but in
elfload.c, we set the first pair to the bounds of the
argv pointers and the second pair to the bounds of
the argv strings.

Remove arg_start/arg_end, replacing them with the standard
argc/argv/envc/envp values.  Retain arg_strings/env_strings
with the meaning we were using in elfload.c.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/714
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220427025129.160184-1-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/elfload.c
linux-user/linuxload.c
linux-user/main.c
linux-user/qemu.h
semihosting/arm-compat-semi.c