# HG changeset patch
# User Vince Weaver <[email protected]>
# Date 1256066137 14400
# Node ID ee8fe6a1ea65c7de7d41966d285b6422b7156c77
# Parent 8d0b4076a8d183175d26564bd811be05f4d2642e
Fix stat64 structure on 32-bit X86_SE
The st_size entry was in the wrong place
(see linux-2.6.29/arch/x86/include/asm/stat.h )
Also, the packed attribute is needed when compiling on a
64-bit machine, otherwise gcc adds extra padding that
break the layout of the structure.
diff -r 8d0b4076a8d1 -r ee8fe6a1ea65 src/arch/x86/linux/linux.hh
--- a/src/arch/x86/linux/linux.hh Tue Oct 20 14:44:51 2009 -0400
+++ b/src/arch/x86/linux/linux.hh Tue Oct 20 15:15:37 2009 -0400
@@ -142,8 +142,8 @@
uint32_t st_uid;
uint32_t st_gid;
uint64_t st_rdev;
+ uint8_t __pad3[4];
int64_t st_size;
- uint8_t __pad3[4];
uint32_t st_blksize;
uint64_t st_blocks;
uint32_t st_atimeX;
@@ -153,7 +153,7 @@
uint32_t st_ctimeX;
uint32_t st_ctime_nsec;
uint64_t st_ino;
- } tgt_stat64;
+ } __attribute__((__packed__)) tgt_stat64;
static OpenFlagTransTable openFlagTable[];
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev