* [PATCH v2] ARM: Fix clone code when built for Thumb.
@ 2013-08-29 20:16 Will Newton
0 siblings, 0 replies; only message in thread
From: Will Newton @ 2013-08-29 20:16 UTC (permalink / raw)
To: libc-ports; +Cc: patches
The mov lr, pc instruction will lose the Thumb bit from the return address
so use blx lr instead.
ports/ChangeLog.arm:
2013-08-29 Will Newton <will.newton@linaro.org>
[BZ #15909]
* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
instead of mov lr, pc.
---
NEWS | 2 +-
ports/sysdeps/unix/sysv/linux/arm/clone.S | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Changes in v2:
- Add BZ number
- Add NEWS entry
diff --git a/NEWS b/NEWS
index d3524ff..4fe4b63 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ Version 2.19
* The following bugs are resolved with this release:
14699, 15522, 15531, 15532, 15736, 15749, 15797, 15867, 15890, 15897,
- 15905.
+ 15905, 15909.
* CVE-2013-4237 The readdir_r function could write more than NAME_MAX bytes
to the d_name member of struct dirent, or omit the terminating NUL
diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S
index ce9c2a5..6e74fa7 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
--
1.8.1.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-08-29 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-29 20:16 [PATCH v2] ARM: Fix clone code when built for Thumb Will Newton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).