From: Will Newton Date: Thu, 29 Aug 2013 19:10:26 +0000 (+0100) Subject: ARM: Fix clone code when built for Thumb. X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4f2bcda964d4fff56855e0c66198c9bcb682ea1e;p=glibc.git ARM: Fix clone code when built for Thumb. 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 [BZ #15909] * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx instead of mov lr, pc. (cherry picked from commit 6b06ac56cdfc9293908724e51e827534e97819aa) --- diff --git a/NEWS b/NEWS index b023c30242..f64fb8225f 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,12 @@ See the end for copying conditions. Please send GNU C library bug reports via using `glibc' in the "product" field. +Version 2.18.1 + +* The following bugs are resolved with this release: + + 15909. + Version 2.18 * The following bugs are resolved with this release: diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm index 1e7a35c6a9..54debd7720 100644 --- a/ports/ChangeLog.arm +++ b/ports/ChangeLog.arm @@ -1,3 +1,9 @@ +2013-08-30 Will Newton + + [BZ #15909] + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx + instead of mov lr, pc. + 2013-07-03 Joseph Myers * sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST): diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S index ce9c2a5ba1..6e74fa702b 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/clone.S +++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S @@ -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