This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ppc32 JUMPTARGET


This patch removes all uses of JUMPTARGET in powerpc32 specific source,
except two that actually do need @plt appended to the label when PIC.
Every other destination label is local.  Of course, the linker
recognizes when a branch destination is local and ignores the PLT reloc,
so this patch doesn't change final linked executables or shared
libraries.  However, the new ppc32 ABI says that the GOT pointer reg
must be set correctly when making a plt call.  So this patch documents
that these calls are in fact local and thus have no need of a GOT
pointer.

2005-05-17  Alan Modra  <amodra@bigpond.net.au>

	* sysdeps/powerpc/powerpc32/sysdep.h (PSEUDO_RET): Don't use
	JUMPTARGET.  Instead append @local to __syscall_error.
	* sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Delete all occurrences
	of JUMPTARGET.  Instead append @local to labels.
	* sysdeps/powerpc/powerpc32/bsd-setjmp.S: Likewise.
	* sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise.
	* sysdeps/powerpc/powerpc32/ppc-mcount.S: Likewise.
	* sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise.

linuxthreads/

2005-05-17  Alan Modra  <amodra@bigpond.net.au>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
	all occurrences of JUMPTARGET.  Instead append @local to labels.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise.

nptl/

2005-05-17  Alan Modra  <amodra@bigpond.net.au>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
	all occurrences of JUMPTARGET.  Instead append @local to labels.


diff -urp -xCVS libc3/sysdeps/powerpc/powerpc32/sysdep.h libc4/sysdeps/powerpc/powerpc32/sysdep.h
--- libc3/sysdeps/powerpc/powerpc32/sysdep.h	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/powerpc/powerpc32/sysdep.h	2005-05-17 10:33:46.000000000 +0930
@@ -124,7 +124,7 @@
 
 #define PSEUDO_RET							      \
     bnslr+;								      \
-    b JUMPTARGET(__syscall_error)
+    b __syscall_error@local
 #define ret PSEUDO_RET
 
 #undef	PSEUDO_END
diff -urp -xCVS libc3/sysdeps/powerpc/powerpc32/bsd-_setjmp.S libc4/sysdeps/powerpc/powerpc32/bsd-_setjmp.S
--- libc3/sysdeps/powerpc/powerpc32/bsd-_setjmp.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/powerpc/powerpc32/bsd-_setjmp.S	2005-05-17 10:33:46.000000000 +0930
@@ -26,7 +26,7 @@
 /* Build a non-versioned object for rtld-*.  */
 ENTRY (BP_SYM (_setjmp))
 	li r4,0			/* Set second argument to 0.  */
-	b JUMPTARGET(BP_SYM (__sigsetjmp))
+	b BP_SYM (__sigsetjmp@local)
 END (BP_SYM (_setjmp))
 libc_hidden_def (_setjmp)
 #else
@@ -37,7 +37,7 @@ symbol_version (__novmx_setjmp,_setjmp,G
 
 ENTRY (BP_SYM (__novmx_setjmp))
 	li r4,0			/* Set second argument to 0.  */
-	b JUMPTARGET(BP_SYM (__novmx__sigsetjmp))
+	b BP_SYM (__novmx__sigsetjmp@local)
 END (BP_SYM (__novmx_setjmp))
 libc_hidden_def (__novmx_setjmp)
 # endif /* defined SHARED  && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) */
@@ -48,12 +48,12 @@ default_symbol_version (__vmx_setjmp,_se
    if HAVE_CLEANUP_JMP_BUF is defined */
 ENTRY (BP_SYM (__GI__setjmp))
 	li r4,0			/* Set second argument to 0.  */
-	b JUMPTARGET(BP_SYM (__vmx__sigsetjmp))
+	b BP_SYM (__vmx__sigsetjmp@local)
 END (BP_SYM (__GI__setjmp))
 
 ENTRY (BP_SYM (__vmx_setjmp))
 	li r4,0			/* Set second argument to 0.  */
-	b JUMPTARGET(BP_SYM (__vmx__sigsetjmp))
+	b BP_SYM (__vmx__sigsetjmp@local)
 END (BP_SYM (__vmx_setjmp))
 libc_hidden_def (__vmx_setjmp)
 #endif /* !NOT_IN_libc */
diff -urp -xCVS libc3/sysdeps/powerpc/powerpc32/bsd-setjmp.S libc4/sysdeps/powerpc/powerpc32/bsd-setjmp.S
--- libc3/sysdeps/powerpc/powerpc32/bsd-setjmp.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/powerpc/powerpc32/bsd-setjmp.S	2005-05-17 10:33:46.000000000 +0930
@@ -25,7 +25,7 @@
 
 ENTRY (__novmxsetjmp)
 	li r4,1			/* Set second argument to 1.  */
-	b JUMPTARGET (__novmx__sigsetjmp)
+	b __novmx__sigsetjmp@local
 END (__novmxsetjmp)
 strong_alias (__novmxsetjmp, __novmx__setjmp)
 symbol_version (__novmxsetjmp, setjmp, GLIBC_2.0)
@@ -34,7 +34,7 @@ symbol_version (__novmxsetjmp, setjmp, G
 
 ENTRY (__vmxsetjmp)
 	li r4,1			/* Set second argument to 1.  */
-	b JUMPTARGET (__vmx__sigsetjmp)
+	b __vmx__sigsetjmp@local
 END (__vmxsetjmp)
 strong_alias (__vmxsetjmp, __vmx__setjmp)
 strong_alias (__vmx__setjmp, __setjmp)
diff -urp -xCVS libc3/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S libc4/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
--- libc3/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S	2005-05-17 10:25:55.000000000 +0930
+++ libc4/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S	2005-05-17 10:33:46.000000000 +0930
@@ -164,5 +164,5 @@ L(aligned_save_vmx):
 	stvx	31,0,r6
 L(no_vmx):
 #endif
-	b JUMPTARGET (BP_SYM (__sigjmp_save))
+	b BP_SYM (__sigjmp_save@local)
 END (BP_SYM (__sigsetjmp))
diff -urp -xCVS libc3/sysdeps/powerpc/powerpc32/ppc-mcount.S libc4/sysdeps/powerpc/powerpc32/ppc-mcount.S
--- libc3/sysdeps/powerpc/powerpc32/ppc-mcount.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/powerpc/powerpc32/ppc-mcount.S	2005-05-17 10:33:46.000000000 +0930
@@ -62,7 +62,7 @@ ENTRY(_mcount)
 	stw	r10,40(r1)
 	stw	r4, 44(r1)
 	stw	r5,  8(r1)
-	bl	JUMPTARGET(__mcount_internal)
+	bl	__mcount_internal@local
 	nop
  /* Restore the registers...  */
 	lwz     r6,  8(r1)
diff -urp -xCVS libc3/sysdeps/powerpc/powerpc32/setjmp-common.S libc4/sysdeps/powerpc/powerpc32/setjmp-common.S
--- libc3/sysdeps/powerpc/powerpc32/setjmp-common.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/powerpc/powerpc32/setjmp-common.S	2005-05-17 10:33:46.000000000 +0930
@@ -55,5 +55,5 @@ ENTRY (BP_SYM (__sigsetjmp))
 	stw  r29,((JB_GPRS+15)*4)(3)
 	stw  r30,((JB_GPRS+16)*4)(3)
 	stw  r31,((JB_GPRS+17)*4)(3)
-	b JUMPTARGET (BP_SYM (__sigjmp_save))
+	b BP_SYM (__sigjmp_save@local)
 END (BP_SYM (__sigsetjmp))
diff -urp -xCVS libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S
--- libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S	2005-05-17 10:33:46.000000000 +0930
@@ -48,7 +48,7 @@ ENTRY (BP_SYM (__brk))
 	li	r3,0
 	blelr+
 	li      r3,ENOMEM
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 END (BP_SYM (__brk))
 
 weak_alias (BP_SYM (__brk), BP_SYM (brk))
diff -urp -xCVS libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
--- libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S	2005-05-17 10:33:46.000000000 +0930
@@ -132,11 +132,11 @@ L(parent):
 #endif
 	addi	r1,r1,32
 	bnslr+
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 
 L(badargs):
 	li	r3,EINVAL
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 END (BP_SYM (__clone))
 
 weak_alias (BP_SYM (__clone), BP_SYM (clone))
diff -urp -xCVS libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
--- libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S	2005-05-17 10:33:46.000000000 +0930
@@ -251,7 +251,7 @@ L(no_vec):
 	stw	r3,_UC_REGS_PTR(r12)
 	addi	r5,r12,_UC_SIGMASK
 	li	r3,SIG_BLOCK
-	bl	JUMPTARGET(__sigprocmask)
+	bl	__sigprocmask@local
 
 	lwz	r0,_FRAME_LR_SAVE+16(r1)
 	addi	r1,r1,16
@@ -363,7 +363,7 @@ ENTRY(__novec_getcontext)
 	addi	r5,r3,_UC_SIGMASK - _UC_REG_SPACE
 	li	r4,0
 	li	r3,SIG_BLOCK
-	bl	JUMPTARGET(__sigprocmask)
+	bl	__sigprocmask@local
 
 	lwz	r0,20(r1)
 	addi	r1,r1,16
@@ -384,7 +384,7 @@ compat_symbol (libc, __novec_getcontext,
 	compat_text_section
 ENTRY (__getcontext_stub)
 	li	r3,ENOSYS
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 END (__getcontext_stub)
 	.previous
 
diff -urp -xCVS libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
--- libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S	2005-05-17 10:33:46.000000000 +0930
@@ -101,7 +101,7 @@ ENTRY(__makecontext)
 L(exitcode):
 	mr.	r3,r31
 	beq	4f
-	bl	JUMPTARGET(__setcontext)
+	bl	__setcontext@local
 4:	bl	HIDDEN_JUMPTARGET(exit)
 	b	4b
 
@@ -188,7 +188,7 @@ ENTRY(__novec_makecontext)
 L(novec_exitcode):
 	mr.	r3,r31
 	beq	4f
-	bl	JUMPTARGET(__novec_setcontext)
+	bl	__novec_setcontext@local
 4:	bl	HIDDEN_JUMPTARGET(exit)
 	b	4b
 
@@ -206,7 +206,7 @@ compat_symbol (libc, __novec_makecontext
 	compat_text_section
 ENTRY (__makecontext_stub)
 	li	r3,ENOSYS
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 END (__makecontext_stub)
 	.previous
 
diff -urp -xCVS libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
--- libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S	2005-05-17 10:33:46.000000000 +0930
@@ -52,7 +52,7 @@ ENTRY(__setcontext)
 	li	r5,0
 	addi	r4,r3,_UC_SIGMASK
 	li	r3,SIG_SETMASK
-	bl	JUMPTARGET(__sigprocmask)
+	bl	__sigprocmask@local
 	cmpwi	r3,0
 	bne	L(error_exit)
 
@@ -295,7 +295,7 @@ ENTRY(__novec_setcontext)
 	li	r5,0
 	addi	r4,r3,_UC_SIGMASK
 	li	r3,SIG_SETMASK
-	bl	JUMPTARGET(__sigprocmask)
+	bl	__sigprocmask@local
 	cmpwi	r3,0
 	bne	L(novec_error_exit)
 
@@ -405,7 +405,7 @@ compat_symbol (libc, __novec_setcontext,
 	compat_text_section
 ENTRY (__setcontext_stub)
 	li	r3,ENOSYS
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 END (__setcontext_stub)
 	.previous
 
diff -urp -xCVS libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
--- libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S	2005-05-17 10:33:46.000000000 +0930
@@ -249,7 +249,7 @@ L(no_vec):
 	stw	r3,_UC_REGS_PTR(r12)
 	addi	r5,r12,_UC_SIGMASK
 	li	r3,SIG_SETMASK
-	bl	JUMPTARGET(__sigprocmask)
+	bl	__sigprocmask@local
 	cmpwi	r3,0
 	bne	L(error_exit)
 
@@ -579,7 +579,7 @@ ENTRY(__novec_swapcontext)
 	addi	r5,r3,_UC_SIGMASK - _UC_REG_SPACE
 	addi	r4,r4,_UC_SIGMASK
 	li	r3,SIG_SETMASK
-	bl	JUMPTARGET(__sigprocmask)
+	bl	__sigprocmask@local
 	cmpwi	r3,0
 	bne	L(novec_error_exit)
 
@@ -706,7 +706,7 @@ compat_symbol (libc, __novec_swapcontext
 	compat_text_section
 ENTRY (__swapcontext_stub)
 	li	r3,ENOSYS
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 END (__swapcontext_stub)
 	.previous
 
diff -urp -xCVS libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
--- libc3/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S	2005-05-17 10:33:46.000000000 +0930
@@ -50,7 +50,7 @@ ENTRY (__vfork)
 	bnslr+
 
 .Lsyscall_error:
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 #endif
 
 PSEUDO_END (__vfork)
diff -urp -xCVS libc3/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h libc4/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
--- libc3/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h	2005-05-16 21:21:10.000000000 +0930
+++ libc4/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h	2005-05-17 10:33:46.000000000 +0930
@@ -76,14 +76,14 @@
 # define UNDOCARGS_6	lwz 8,40(1); UNDOCARGS_5
 
 # ifdef IS_IN_libpthread
-#  define CENABLE	bl JUMPTARGET(__pthread_enable_asynccancel)
-#  define CDISABLE	bl JUMPTARGET(__pthread_disable_asynccancel)
+#  define CENABLE	bl __pthread_enable_asynccancel@local
+#  define CDISABLE	bl __pthread_disable_asynccancel@local
 # elif !defined NOT_IN_libc
-#  define CENABLE	bl JUMPTARGET(__libc_enable_asynccancel)
-#  define CDISABLE	bl JUMPTARGET(__libc_disable_asynccancel)
+#  define CENABLE	bl __libc_enable_asynccancel@local
+#  define CDISABLE	bl __libc_disable_asynccancel@local
 # else
-#  define CENABLE	bl JUMPTARGET(__librt_enable_asynccancel)
-#  define CDISABLE	bl JUMPTARGET(__librt_disable_asynccancel)
+#  define CENABLE	bl __librt_enable_asynccancel@local
+#  define CDISABLE	bl __librt_disable_asynccancel@local
 # endif
 
 # ifdef HAVE_TLS_SUPPORT
diff -urp -xCVS libc3/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S libc4/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
--- libc3/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S	2005-05-16 21:21:10.000000000 +0930
+++ libc4/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S	2005-05-17 10:33:46.000000000 +0930
@@ -69,7 +69,7 @@ ENTRY (__vfork)
 	bnslr+
 
 .Lsyscall_error:
-	b	JUMPTARGET(__syscall_error)
+	b	__syscall_error@local
 #endif
 
 PSEUDO_END (__vfork)
diff -urp -xCVS libc3/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h libc4/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
--- libc3/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h	2005-05-16 21:21:10.000000000 +0930
+++ libc4/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h	2005-05-17 10:33:46.000000000 +0930
@@ -85,14 +85,14 @@
 # define UNDOCARGS_6	lwz 8,40(1); UNDOCARGS_5
 
 # ifdef IS_IN_libpthread
-#  define CENABLE	bl JUMPTARGET(__pthread_enable_asynccancel)
-#  define CDISABLE	bl JUMPTARGET(__pthread_disable_asynccancel)
+#  define CENABLE	bl __pthread_enable_asynccancel@local
+#  define CDISABLE	bl __pthread_disable_asynccancel@local
 # elif !defined NOT_IN_libc
-#  define CENABLE	bl JUMPTARGET(__libc_enable_asynccancel)
-#  define CDISABLE	bl JUMPTARGET(__libc_disable_asynccancel)
+#  define CENABLE	bl __libc_enable_asynccancel@local
+#  define CDISABLE	bl __libc_disable_asynccancel@local
 # elif defined IS_IN_librt
-#  define CENABLE	bl JUMPTARGET(__librt_enable_asynccancel)
-#  define CDISABLE	bl JUMPTARGET(__librt_disable_asynccancel)
+#  define CENABLE	bl __librt_enable_asynccancel@local
+#  define CDISABLE	bl __librt_disable_asynccancel@local
 # else
 #  error Unsupported library
 # endif

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]