summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2014-05-20 16:34:59 -0400
committerWill Newton <will.newton@linaro.org>2014-07-03 15:22:06 +0100
commit2c675cb835b50335e16a9cc48e4ffc15b2dd76a2 (patch)
tree61748cb223feed2316c35d1ce7fe3c613afb9cff
parent7f9152f0d543081a68a97f19a2f312b0f530d0a6 (diff)
aarch64: Use tpidr_el0 rather than __errno_location in librt
-rw-r--r--libc/ports/ChangeLog.aarch64.linaro8
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data1
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h19
3 files changed, 12 insertions, 16 deletions
diff --git a/libc/ports/ChangeLog.aarch64.linaro b/libc/ports/ChangeLog.aarch64.linaro
index 83f96a009..ec999f807 100644
--- a/libc/ports/ChangeLog.aarch64.linaro
+++ b/libc/ports/ChangeLog.aarch64.linaro
@@ -1,7 +1,13 @@
2014-05-29 Richard Henderson <rth@twiddle.net>
+ * sysdeps/unix/sysv/linux/aarch64/sysdep.h [NOT_IN_libc]
+ (SYSCALL_ERROR_HANDLER): Use tpidr_el0 instead of a call
+ to __errno_location.
+ * sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data (libpthread.so):
+ Remove the expected plt for __errno_location.
+
* sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h
- [!NOT_IN_libc] (SINGLE_THREAD_P): Use tpidr_el0 instead of a
+ [NOT_IN_libc] (SINGLE_THREAD_P): Use tpidr_el0 instead of a
call to __read_tp.
* sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h (PSEUDO):
diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data b/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data
index 84af95dc3..dfca9a7ac 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data
+++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data
@@ -12,4 +12,3 @@ libm.so: matherr
libm.so: __signbit
libm.so: __signbitf
libm.so: __signbitl
-libpthread.so: __errno_location
diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index 89f4adb98..db845e65f 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -123,21 +123,12 @@
# define SYSCALL_ERROR_HANDLER \
.Lsyscall_error: \
- stp x29, x30, [sp, -32]!; \
- cfi_adjust_cfa_offset (32); \
- cfi_rel_offset (x29, 0); \
- cfi_rel_offset (x30, 8); \
- add x29, sp, 0; \
- str x19, [sp,16]; \
- neg x19, x0; \
- bl C_SYMBOL_NAME(__errno_location); \
- str w19, [x0]; \
+ adrp x1, :gottprel:errno; \
+ neg w2, w0; \
+ ldr x1, [x1, :gottprel_lo12:errno]; \
+ mrs x3, tpidr_el0; \
mov x0, -1; \
- ldr x19, [sp,16]; \
- ldp x29, x30, [sp], 32; \
- cfi_adjust_cfa_offset (-32); \
- cfi_restore (x29); \
- cfi_restore (x30); \
+ str w2, [x1, x3]; \
RET;
# endif
# else