changeset ce63047d1bd9 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=ce63047d1bd9
description:
        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.

diffstat:

1 file changed, 2 insertions(+), 2 deletions(-)
src/arch/x86/linux/linux.hh |    4 ++--

diffs (22 lines):

diff -r a3c85a29b838 -r ce63047d1bd9 src/arch/x86/linux/linux.hh
--- a/src/arch/x86/linux/linux.hh       Tue Oct 27 09:24:40 2009 -0700
+++ 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

Reply via email to