summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/sysdeps/linux/arm/__longjmp.S4
-rw-r--r--libc/sysdeps/linux/arm/mmap64.S4
-rw-r--r--libc/sysdeps/linux/arm/syscall-eabi.S4
3 files changed, 12 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/arm/__longjmp.S b/libc/sysdeps/linux/arm/__longjmp.S
index a21d26a79..27f127122 100644
--- a/libc/sysdeps/linux/arm/__longjmp.S
+++ b/libc/sysdeps/linux/arm/__longjmp.S
@@ -61,7 +61,11 @@ __longjmp:
# endif
#endif
+#if defined(__USE_BX__)
+ bx lr
+#else
mov pc, lr
+#endif
.size __longjmp,.-__longjmp
libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/arm/mmap64.S b/libc/sysdeps/linux/arm/mmap64.S
index 847157b1b..ba8cb2fca 100644
--- a/libc/sysdeps/linux/arm/mmap64.S
+++ b/libc/sysdeps/linux/arm/mmap64.S
@@ -52,7 +52,11 @@ mmap64:
DO_CALL (mmap2)
cmn r0, $4096
ldmfd sp!, {r4, r5}
+#if defined(__USE_BX__)
+ bxcc lr
+#else
movcc pc, lr
+#endif
b __syscall_error
.Linval:
mov r0, $-EINVAL
diff --git a/libc/sysdeps/linux/arm/syscall-eabi.S b/libc/sysdeps/linux/arm/syscall-eabi.S
index 761051754..efc30690c 100644
--- a/libc/sysdeps/linux/arm/syscall-eabi.S
+++ b/libc/sysdeps/linux/arm/syscall-eabi.S
@@ -37,7 +37,11 @@ syscall:
swi 0x0
ldmfd sp!, {r4, r5, r6, r7}
cmn r0, #4096
+#if defined(__USE_BX__)
+ bxcc lr
+#else
movcc pc, lr
+#endif
b __syscall_error
.size syscall,.-syscall