From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GN5Nq-0000hA-HV for qemu-devel@nongnu.org; Tue, 12 Sep 2006 06:20:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GN5Nj-0000f1-Te for qemu-devel@nongnu.org; Tue, 12 Sep 2006 06:20:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GN5Nj-0000ey-LC for qemu-devel@nongnu.org; Tue, 12 Sep 2006 06:20:43 -0400 Received: from [193.205.80.99] (helo=sssup.it) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GN5PC-00060v-Oh for qemu-devel@nongnu.org; Tue, 12 Sep 2006 06:22:15 -0400 Received: from [193.205.82.7] (HELO gandalf.sssup.it) by sssup.it (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 24192033 for qemu-devel@nongnu.org; Tue, 12 Sep 2006 12:13:41 +0200 Date: Tue, 12 Sep 2006 12:20:35 +0200 From: Claudio Scordino Message-Id: <200609121220.35835.cloud.of.andor@gmail.com> References: <200609061224.06766.cloud.of.andor@gmail.com> <44FF4D47.8050401@gandalf.sssup.it> <20060907093811.GK15302@sd033.hel.movial.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20060907093811.GK15302@sd033.hel.movial.fi> Content-Type: Multipart/Mixed; boundary="Boundary-00=_znoBF27K/zx64Qd" Subject: [Qemu-devel] [PATCH] qemu-armeb linux stat64 syscall fix Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: fabio checconi , Michael Trimarchi --Boundary-00=_znoBF27K/zx64Qd Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all, =A0 =A0 we had a problem compiling the linux kernel using for an=20 arm big endian target in the qemu-armeb environment.=20 The compilation stopped when executing the split-include utility during=20 the kernel compilation phase: split-include exited with an error of the=20 stat64 syscall, executed in the environment emulated by qemu.=20 Qemu seemed to ignore the fact that in big endian systems the fields=20 st_blocks and its padding are swapped (to allow future expansion of the=20 field,) so the fix consisted only in swapping the two fields (only in big=20 endian systems, of course.) The attached patch should fix the problem. Regards, Michael, Fabio and Claudio --Boundary-00=_znoBF27K/zx64Qd Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="44_armbe_stat64_linux.patch" diff -ur qemu-0.8.1.orig/linux-user/syscall_defs.h qemu-0.8.1/linux-user/sy= scall_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; =20 +#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 =20 target_ulong target_st_atime; target_ulong __pad5; --Boundary-00=_znoBF27K/zx64Qd--