Claudio Scordino wrote: > Hi all, > > more than one year ago we sent a patch on this mailing list to fix a > problem of the fstat syscall for armeb. See > > http://lists.gnu.org/archive/html/qemu-devel/2006-09/msg00137.html > > We found the bug compiling a Linux kernel for armeb on scratchbox. > > 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 patch just changed qemu/linux-user/syscall_defs.h to > > #ifndef TARGET_WORDS_BIGENDIAN > target_ulong st_blocks; > target_ulong __pad4; > #else > target_ulong __pad4; > target_ulong st_blocks; > #endif
AFAICS this assumption matches neither the glibc 2.6 nor the Linux 2.6.23 definitions. There is, however, an endianness difference in handling the st_dev and st_rdev fields which is not handled properly in QEMU. I think this needs a separate struct stat definition for (non-EABI) big endian ARM. Thiemo