patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch
changeset 3242 009261a930fc
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch	Mon Oct 07 00:16:20 2013 +0200
     1.3 @@ -0,0 +1,65 @@
     1.4 +commit 4f2bcda964d4fff56855e0c66198c9bcb682ea1e
     1.5 +Author: Will Newton <will.newton@linaro.org>
     1.6 +Date:   Thu Aug 29 20:10:26 2013 +0100
     1.7 +
     1.8 +    ARM: Fix clone code when built for Thumb.
     1.9 +    
    1.10 +    The mov lr, pc instruction will lose the Thumb bit from the return address
    1.11 +    so use blx lr instead.
    1.12 +    
    1.13 +    ports/ChangeLog.arm:
    1.14 +    
    1.15 +    2013-08-30  Will Newton  <will.newton@linaro.org>
    1.16 +    
    1.17 +    	[BZ #15909]
    1.18 +    	* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
    1.19 +    	instead of mov lr, pc.
    1.20 +    
    1.21 +    (cherry picked from commit 6b06ac56cdfc9293908724e51e827534e97819aa)
    1.22 +
    1.23 +diff --git a/NEWS b/NEWS
    1.24 +index b023c30..f64fb82 100644
    1.25 +--- a/NEWS
    1.26 ++++ b/NEWS
    1.27 +@@ -5,6 +5,12 @@ See the end for copying conditions.
    1.28 + Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
    1.29 + using `glibc' in the "product" field.
    1.30 + 
    1.31 ++Version 2.18.1
    1.32 ++
    1.33 ++* The following bugs are resolved with this release:
    1.34 ++
    1.35 ++  15909.
    1.36 ++
    1.37 + Version 2.18
    1.38 + 
    1.39 + * The following bugs are resolved with this release:
    1.40 +diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
    1.41 +index 1e7a35c..54debd7 100644
    1.42 +--- a/ports/ChangeLog.arm
    1.43 ++++ b/ports/ChangeLog.arm
    1.44 +@@ -1,3 +1,9 @@
    1.45 ++2013-08-30  Will Newton  <will.newton@linaro.org>
    1.46 ++
    1.47 ++	[BZ #15909]
    1.48 ++	* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
    1.49 ++	instead of mov lr, pc.
    1.50 ++
    1.51 + 2013-07-03  Joseph Myers  <joseph@codesourcery.com>
    1.52 + 
    1.53 + 	* sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST):
    1.54 +diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S
    1.55 +index ce9c2a5..6e74fa7 100644
    1.56 +--- a/ports/sysdeps/unix/sysv/linux/arm/clone.S
    1.57 ++++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S
    1.58 +@@ -93,8 +93,8 @@ PSEUDO_END (__clone)
    1.59 + 	mov	lr, pc
    1.60 + 	bx      ip
    1.61 + #else
    1.62 +-	mov	lr, pc
    1.63 +-	ldr 	pc, [sp], #8
    1.64 ++	ldr 	lr, [sp], #8
    1.65 ++	blx	lr
    1.66 + #endif
    1.67 + 
    1.68 + 	@ and we are done, passing the return value through r0