]> sourceware.org Git - glibc.git/commitdiff
ARM: Fix clone code when built for Thumb.
authorWill Newton <will.newton@linaro.org>
Thu, 29 Aug 2013 19:10:26 +0000 (20:10 +0100)
committerWill Newton <will.newton@linaro.org>
Fri, 30 Aug 2013 10:15:20 +0000 (11:15 +0100)
The mov lr, pc instruction will lose the Thumb bit from the return address
so use blx lr instead.

ports/ChangeLog.arm:

2013-08-30  Will Newton  <will.newton@linaro.org>

[BZ #15909]
* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
instead of mov lr, pc.

(cherry picked from commit 6b06ac56cdfc9293908724e51e827534e97819aa)

NEWS
ports/ChangeLog.arm
ports/sysdeps/unix/sysv/linux/arm/clone.S

diff --git a/NEWS b/NEWS
index b023c30242d409e0e3f9bff2d40ff1f0d7716427..f64fb8225f72a82e689858bba8c12b490efe9fa6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,12 @@ See the end for copying conditions.
 Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
 using `glibc' in the "product" field.
 \f
+Version 2.18.1
+
+* The following bugs are resolved with this release:
+
+  15909.
+\f
 Version 2.18
 
 * The following bugs are resolved with this release:
index 1e7a35c6a91c9c3ea7d4664f59d7429a6f0cfbfd..54debd77203bb829cbd979926940d66ad58759a3 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-30  Will Newton  <will.newton@linaro.org>
+
+       [BZ #15909]
+       * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
+       instead of mov lr, pc.
+
 2013-07-03  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST):
index ce9c2a5ba1c50eeec194dff52d7000fbf04258cc..6e74fa702b5d044c286b195f27d9aecf0ec4bae4 100644 (file)
@@ -93,8 +93,8 @@ PSEUDO_END (__clone)
        mov     lr, pc
        bx      ip
 #else
-       mov     lr, pc
-       ldr     pc, [sp], #8
+       ldr     lr, [sp], #8
+       blx     lr
 #endif
 
        @ and we are done, passing the return value through r0
This page took 0.050153 seconds and 5 git commands to generate.