2005-06-10 Phil Blundell <pb@reciva.com>
authorPhil Blundell <pb@reciva.com>
Fri, 10 Jun 2005 18:10:47 +0000 (18:10 +0000)
committerPhil Blundell <pb@reciva.com>
Fri, 10 Jun 2005 18:10:47 +0000 (18:10 +0000)
Bug #957:
* sysdeps/unix/sysv/linux/arm/mmap64.S: Handle offset correctly on
big endian machines.  Reported by Sven Henkel <shenkel@gmail.com>.

ChangeLog.arm
sysdeps/unix/sysv/linux/arm/mmap64.S

index 360b06f..b5186cd 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-10  Phil Blundell  <pb@reciva.com>
+
+       Bug #957:
+       * sysdeps/unix/sysv/linux/arm/mmap64.S: Handle offset correctly on
+       big endian machines.  Reported by Sven Henkel <shenkel@gmail.com>.
+
 2005-05-09  Daniel Jacobowitz  <dan@codesourcery.com>
            Mark Mitchell  <mark@codesourcery.com>
 
index b4b712c..5899140 100644 (file)
        .text
 ENTRY (__mmap64)
 #ifdef __NR_mmap2
+#ifdef __ARMEB__
+       ldr     ip, [sp, $8]            @ offset low part   
+       str     r5, [sp, #-4]!   
+       ldr     r5, [sp, $8]            @ offset high part   
+       str     r4, [sp, #-4]!   
+#else
        ldr     ip, [sp, $4]            @ offset low part
        str     r5, [sp, #-4]!
        ldr     r5, [sp, $12]           @ offset high part
        str     r4, [sp, #-4]!
+#endif
        movs    r4, ip, lsl $20         @ check that offset is page-aligned
        mov     ip, ip, lsr $12
        moveqs  r4, r5, lsr $12         @ check for overflow