qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Claudio Scordino <cloud.of.andor@gmail.com>
To: qemu-devel@nongnu.org
Cc: fabio checconi <fabio@gandalf.sssup.it>,
	Michael Trimarchi <trimarchi@gandalf.sssup.it>
Subject: [Qemu-devel] [PATCH] qemu-armeb linux stat64 syscall fix
Date: Tue, 12 Sep 2006 12:20:35 +0200	[thread overview]
Message-ID: <200609121220.35835.cloud.of.andor@gmail.com> (raw)
In-Reply-To: <20060907093811.GK15302@sd033.hel.movial.fi>

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

Hi all,

    we had a problem compiling the linux kernel using for an 
arm big endian target in the qemu-armeb environment. 

The compilation  stopped when executing the split-include utility during 
the kernel compilation phase: split-include exited with an error of the 
stat64 syscall, executed in the environment emulated by qemu. 

Qemu seemed to ignore the fact that in big endian systems the fields 
st_blocks and its padding are swapped (to allow future expansion of the 
field,) so the fix consisted only in swapping the two fields (only in big 
endian systems, of course.)

The attached patch  should fix the problem.

Regards,

            Michael, Fabio and Claudio


[-- Attachment #2: 44_armbe_stat64_linux.patch --]
[-- Type: text/plain, Size: 703 bytes --]

diff -ur qemu-0.8.1.orig/linux-user/syscall_defs.h qemu-0.8.1/linux-user/syscall_defs.h
--- qemu-0.8.1.orig/linux-user/syscall_defs.h	2006-09-07 21:49:22.000000000 +0000
+++ qemu-0.8.1/linux-user/syscall_defs.h	2006-09-07 21:51:10.000000000 +0000
@@ -914,8 +914,13 @@
 	long long	st_size;
 	target_ulong	st_blksize;
 
+#ifndef TARGET_WORDS_BIGENDIAN
 	target_ulong	st_blocks;	/* Number 512-byte blocks allocated. */
 	target_ulong	__pad4;		/* future possible st_blocks high bits */
+#else
+	target_ulong	__pad4;		/* future possible st_blocks high bits */
+	target_ulong	st_blocks;	/* Number 512-byte blocks allocated. */
+#endif
 
 	target_ulong	target_st_atime;
 	target_ulong	__pad5;

           reply	other threads:[~2006-09-12 10:20 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20060907093811.GK15302@sd033.hel.movial.fi>]

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=200609121220.35835.cloud.of.andor@gmail.com \
    --to=cloud.of.andor@gmail.com \
    --cc=fabio@gandalf.sssup.it \
    --cc=qemu-devel@nongnu.org \
    --cc=trimarchi@gandalf.sssup.it \
    /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).