summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/arm')
-rw-r--r--libc/sysdeps/linux/arm/clone.S6
-rw-r--r--libc/sysdeps/linux/arm/vfork.S8
2 files changed, 13 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/arm/clone.S b/libc/sysdeps/linux/arm/clone.S
index 6672c7d6e..98b1296c0 100644
--- a/libc/sysdeps/linux/arm/clone.S
+++ b/libc/sysdeps/linux/arm/clone.S
@@ -52,7 +52,11 @@ clone:
DO_CALL (clone)
movs a1, a1
blt __error
- movne pc, lr
+#if defined(__THUMB_INTERWORK__)
+ bxne lr
+#else
+ movne pc, lr
+#endif
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
diff --git a/libc/sysdeps/linux/arm/vfork.S b/libc/sysdeps/linux/arm/vfork.S
index e13636940..486a7e8e4 100644
--- a/libc/sysdeps/linux/arm/vfork.S
+++ b/libc/sysdeps/linux/arm/vfork.S
@@ -26,7 +26,11 @@ __vfork:
#ifdef __NR_vfork
DO_CALL (vfork)
cmn r0, #4096
+#if defined(__THUMB_INTERWORK__)
+ bxcc lr
+#else
movcc pc, lr
+#endif
/* Check if vfork even exists. */
ldr r1, =-ENOSYS
@@ -39,7 +43,11 @@ __vfork:
cmn r0, #4096
/* Syscall worked. Return to child/parent */
+#if defined(__THUMB_INTERWORK__)
+ bxcc lr
+#else
movcc pc, lr
+#endif
__error:
b __syscall_error