Browse Source

remove unused code, RTLD_PRIVATE_ERRNO is never defined

Waldemar Brodkorb 8 years ago
parent
commit
d1bf524bae

+ 0 - 11
libc/sysdeps/linux/arm/sysdep.h

@@ -142,16 +142,6 @@
 
 #if defined NOT_IN_libc
 # define SYSCALL_ERROR __local_syscall_error
-# ifdef RTLD_PRIVATE_ERRNO
-#  define SYSCALL_ERROR_HANDLER					\
-__local_syscall_error:						\
-       ldr     r1, 1f;						\
-       rsb     r0, r0, #0;					\
-0:     str     r0, [pc, r1];					\
-       mvn     r0, #0;						\
-       DO_RET(lr);						\
-1:     .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
-# else
 #  define SYSCALL_ERROR_HANDLER					\
 __local_syscall_error:						\
 	str	lr, [sp, #-4]!;					\
@@ -162,7 +152,6 @@ __local_syscall_error:						\
 	str	r1, [r0];					\
 	mvn	r0, #0;						\
 	ldr	pc, [sp], #4;
-# endif
 #else
 # define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
 # define SYSCALL_ERROR __syscall_error

+ 1 - 11
libc/sysdeps/linux/i386/sysdep.h

@@ -186,17 +186,7 @@ __x86.get_pc_thunk.reg:						      \
 # define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
 #else
 
-# ifdef RTLD_PRIVATE_ERRNO
-#  define SYSCALL_ERROR_HANDLER						      \
-0:SETUP_PIC_REG(cx);							      \
-  addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
-  xorl %edx, %edx;							      \
-  subl %eax, %edx;							      \
-  movl %edx, rtld_errno@GOTOFF(%ecx);					      \
-  orl $-1, %eax;							      \
-  jmp L(pseudo_end);
-
-# elif defined _LIBC_REENTRANT
+# if defined _LIBC_REENTRANT
 
 #  if defined USE___THREAD
 #   ifndef NOT_IN_libc

+ 0 - 11
libc/sysdeps/linux/metag/sysdep.h

@@ -24,16 +24,6 @@
 
 #if defined NOT_IN_libc
 # define SYSCALL_ERROR __local_syscall_error
-# ifdef RTLD_PRIVATE_ERRNO
-#  define SYSCALL_ERROR_HANDLER					\
-__local_syscall_error:						\
-       NEG	D0Re0, D0Re0;					\
-       ADDT	D1Re0, CPC1, #HI(_rtld_errno);			\
-       ADD	D1Re0, D1Re0, #LO(_rtld_errno) + 4;		\
-       SETD	[D1Re0], D0Re0;					\
-       NEG	D0Re0, #0x1;					\
-       MOV	PC, D1RtP;
-# else
 #  define SYSCALL_ERROR_HANDLER					\
 __local_syscall_error:						\
 	MOV	D1Re0, D1RtP;					\
@@ -46,7 +36,6 @@ __local_syscall_error:						\
 	GETD	D1RtP, [A0StP+#-4];				\
 	SUB	A0StP, A0StP, #0x8;				\
 	MOV	PC, D1RtP;
-# endif
 #else
 # define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
 # define SYSCALL_ERROR ___syscall_error

+ 1 - 16
libc/sysdeps/linux/sh/sysdep.h

@@ -130,22 +130,7 @@
 
 #include <libc/sysdeps/linux/sh/syscall_error.S>
 #else
-# ifdef RTLD_PRIVATE_ERRNO
-
-#  define SYSCALL_ERROR_HANDLER	\
-	neg r0,r1; \
-	mov.l 0f,r12; \
-	mova 0f,r0; \
-	add r0,r12; \
-	mov.l 1f,r0; \
-	mov.l r1,@(r0,r12)
-	bra .Lpseudo_end; \
-	 mov _IMM1,r0; \
-	.align 2; \
-     0: .long _GLOBAL_OFFSET_TABLE_; \
-     1: .long rtld_errno@GOTOFF
-
-# elif defined _LIBC_REENTRANT
+# if defined _LIBC_REENTRANT
 
 #  if defined USE___THREAD
 

+ 0 - 9
libc/sysdeps/linux/x86_64/sysdep.h

@@ -167,15 +167,6 @@ lose:									      \
 
 # ifndef __PIC__
 #  define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
-# elif defined(RTLD_PRIVATE_ERRNO)
-#  define SYSCALL_ERROR_HANDLER			\
-0:						\
-  leaq rtld_errno(%rip), %rcx;			\
-  xorl %edx, %edx;				\
-  subq %rax, %rdx;				\
-  movl %edx, (%rcx);				\
-  orq $-1, %rax;				\
-  jmp L(pseudo_end);
 # elif USE___THREAD
 #  ifndef NOT_IN_libc
 #   define SYSCALL_ERROR_ERRNO __libc_errno