From: "J. Mayer" <l_indien@magic.fr>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>
Subject: Re: [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits targets
Date: Wed, 10 Oct 2007 20:42:16 +0200 [thread overview]
Message-ID: <1192041736.9976.193.camel@rapid> (raw)
In-Reply-To: <f43fc5580710100901m650fc9f0hc96c54fd8091fd06@mail.gmail.com>
On Wed, 2007-10-10 at 19:01 +0300, Blue Swirl wrote:
> On 10/10/07, J. Mayer <l_indien@magic.fr> wrote:
> > Following the patches done for elfload32, it appeared to me that there
> > were still problems that would prevent 32 bits executables to run on 64
> > bits target in linux user mode emulation.
> > First of all, the personality was never set to PER_LINUX32
>
> It's set in elfload32.c, but I think your approach is better. The check for
> elf_ex->e_ident[EI_CLASS] == ELFCLASS64
> could be moved from elfload32.c.
Well, it is overriden just before the create_elf_table call... And it's
especially needed there and in the start_thread code, at least for
PowerPC. As the kernel set it up at this point, it seems to be a good
idea to do the same !
> > The second problem was that pointers used to set the values on the stack
> > were still of target_ulong size, which lead 32 bits executable crash
> > dereferencing NULL pointers as soon as they wanted to parse their
> > arguments.
>
> Nice, I was wondering why my test program crashed.
I realized there are tons of unneeded checks/code in my patch, as this
code is compiled twice. I will repost a cleaned one soon...
--
J. Mayer <l_indien@magic.fr>
Never organized
prev parent reply other threads:[~2007-10-10 18:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 7:42 [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits targets J. Mayer
2007-10-10 8:18 ` Fabrice Bellard
2007-10-10 16:09 ` Blue Swirl
2007-10-10 17:49 ` Thiemo Seufer
2007-10-10 18:40 ` Fabrice Bellard
2007-10-10 19:02 ` Blue Swirl
2007-10-10 21:51 ` J. Mayer
2007-10-11 15:17 ` Thiemo Seufer
2007-10-11 15:47 ` Blue Swirl
2007-10-11 16:00 ` Thiemo Seufer
2007-10-11 19:26 ` Blue Swirl
2007-10-11 22:00 ` J. Mayer
2007-10-12 16:21 ` Blue Swirl
2007-10-12 18:42 ` Thiemo Seufer
2007-10-12 19:37 ` Blue Swirl
2007-10-12 20:24 ` Thiemo Seufer
2007-10-10 16:01 ` Blue Swirl
2007-10-10 18:42 ` J. Mayer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1192041736.9976.193.camel@rapid \
--to=l_indien@magic.fr \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).