qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] osdep: Get environment pointer from global vari


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] osdep: Get environment pointer from global variable
Date: Sat, 7 Dec 2013 18:03:15 +0000

On 7 December 2013 13:14, Stefan Weil <address@hidden> wrote:
> Linux provides a global variable __environ, so it is not necessary to
> use envp from main and propagate it via qemu_init_auxval.

I don't think this will work, because __environ changes whenever
the environment is modified (eg by setenv() calls). It's only the
initial environment pointer value that can be used to find the
aux vector by scanning upwards, so we need to capture it at the
start of main() anyhow and might as well just use the 3-arg main
form to do so.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]