qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qemu-ppc can't run static uClibc binaries.


From: Rob Landley
Subject: Re: [Qemu-devel] qemu-ppc can't run static uClibc binaries.
Date: Tue, 16 Feb 2010 13:14:54 -0600
User-agent: KMail/1.11.2 (Linux/2.6.28-17-generic; KDE/4.2.2; x86_64; ; )

On Tuesday 16 February 2010 12:36:15 Alexander Graf wrote:
> On 16.02.2010, at 19:31, Rob Landley wrote:
> > Let's see, one of the lines I #ifdefed out (line 535-ish of linux-
> > user/elfload.c) is:
> >
> >    get_user_ual(_regs->gpr[3], pos);
> >
> > Rummage, rummage... get_user_ual() is a wrapper for get_user() which is a
> > wrapper for __get_user() which assigns to its first argument.  So yeah,
> > that's setting _regs->gpr[3] to a nonzero value.
>
> Well I was wondering on the order of execution. If main() already sets the
> GPRs to 0 it should be 0. I assume the elf reading code comes after that?
> If so, your patch looks correct.

The main() code memsets all the registers to zero when the array is allocated, 
then passes the register array as the first argument to the target-specific 
init_thread(), which can initialize them to other values.

So yeah, main() calls  the elf reading code after the memset.

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds




reply via email to

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