From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Riku Voipio <riku.voipio@iki.fi>,
Richard Henderson <rth@twiddle.net>,
qemu-devel <qemu-devel@nongnu.org>,
qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] linux-user: Fix wrong use of stat instead of stat64 for sparc64
Date: Fri, 06 Sep 2013 19:24:25 +0200 [thread overview]
Message-ID: <522A0FC9.6090205@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA9m8ovnge2haczukBBphE+SkUxhfFxdrOqFqgQ1M4OOHw@mail.gmail.com>
Am 06.09.2013 19:16, schrieb Peter Maydell:
> On 6 September 2013 17:46, Stefan Weil <sw@weilnetz.de> wrote:
>> This test case is fixed now:
>> sparc64-linux-user/qemu-sparc64 /usr/gnemul/qemu-sparc64/busybox ls -l block.c
>>
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> ---
>> linux-user/syscall.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> index ecead51..e498a92 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> @@ -4764,7 +4764,7 @@ static inline abi_long host_to_target_stat64(void *cpu_env,
>> } else
>> #endif
>> {
>> -#if TARGET_ABI_BITS == 64 && !defined(TARGET_ALPHA)
>> +#if TARGET_ABI_BITS == 64 && !defined(TARGET_ALPHA) && !defined(TARGET_SPARC64)
>> struct target_stat *target_st;
>> #else
>> struct target_stat64 *target_st;
> So this condition is trying to identify the platforms
> which don't actually have a struct stat64 (which is
> some but not all of the 64 bit platforms). I think that
> rather than trying to enumerate those here it would
> be better if in the sections of syscall_defs.h which
> define target_stat/target_stat64 we had those sections
> which don't have a target_stat64 definition instead
> #define TARGET_NO_STRUCT_STAT64
> and then used that here.
>
> -- PMM
I even thought about a totally different solution:
Could we write some sample code with all those structs
and system calls, compile it once for each target, and
get all information we need from the resulting binaries
(using tools like pahole, for example)?
For the moment, I think my patch is sufficient (it is also
needed for QEMU 1.6!).
Stefan
next prev parent reply other threads:[~2013-09-06 17:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 16:46 [Qemu-devel] [PATCH] linux-user: Fix wrong use of stat instead of stat64 for sparc64 Stefan Weil
2013-09-06 17:16 ` Peter Maydell
2013-09-06 17:24 ` Stefan Weil [this message]
2013-09-19 17:31 ` Stefan Weil
2013-09-23 11:57 ` Riku Voipio
2013-09-23 12:05 ` Peter Maydell
2013-09-24 9:13 ` Riku Voipio
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=522A0FC9.6090205@weilnetz.de \
--to=sw@weilnetz.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
/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).