about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/aarch64
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2014-05-20 16:34:59 -0400
committerRichard Henderson <rth@redhat.com>2014-05-29 12:41:08 -0400
commit11a28aee60fae347aa7db306965297c24443ff88 (patch)
tree47e27662b09025dece927fe803fc82562f3c3adf /sysdeps/unix/sysv/linux/aarch64
parenta17e5ffb80a17449add001ff7901e317afa6f632 (diff)
downloadglibc-11a28aee60fae347aa7db306965297c24443ff88.tar.gz
glibc-11a28aee60fae347aa7db306965297c24443ff88.tar.xz
glibc-11a28aee60fae347aa7db306965297c24443ff88.zip
aarch64: Use tpidr_el0 rather than __errno_location in librt
Diffstat (limited to 'sysdeps/unix/sysv/linux/aarch64')
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data1
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/sysdep.h19
2 files changed, 5 insertions, 15 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data b/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data
index 84af95dc36..dfca9a7ac7 100644
--- a/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data
+++ b/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/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index 0e91f83c88..8cce986b00 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/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