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]

Re: ppc32 JUMPTARGET


On Tue, May 17, 2005 at 11:30:17PM +0930, Alan Modra wrote:
> 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.

> 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.

Unfortunately this breaks glibc build.
Although __{libc,pthread}_*_asynccancel are really local,
__librt_{en,dis}able_asynccancel are defined in libc.so and used by
syscalls in librt.so.

So for new ppc32 PLT builds we'll need to set up the GOT pointer
if IS_IN_librt.

2005-05-23  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
	[IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
	bl __librt_*_asynccancel@local.

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
	[IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
	bl __librt_*_asynccancel@local.

--- libc/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h.jj	2005-05-23 18:22:09.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h	2005-05-23 18:30:18.000000000 +0200
@@ -1,5 +1,5 @@
 /* Cancellable system call stubs.  Linux/PowerPC version.
-   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>, 2003.
 
@@ -91,8 +91,8 @@
 #  define CENABLE	bl __libc_enable_asynccancel@local
 #  define CDISABLE	bl __libc_disable_asynccancel@local
 # elif defined IS_IN_librt
-#  define CENABLE	bl __librt_enable_asynccancel@local
-#  define CDISABLE	bl __librt_disable_asynccancel@local
+#  define CENABLE	JUMPTARGET(__librt_enable_asynccancel)
+#  define CDISABLE	JUMPTARGET(__librt_disable_asynccancel)
 # else
 #  error Unsupported library
 # endif
--- libc/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h.jj	2005-05-23 18:22:15.000000000 +0200
+++ libc/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h	2005-05-23 18:29:30.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>, 2003.
 
@@ -82,8 +82,8 @@
 #  define CENABLE	bl __libc_enable_asynccancel@local
 #  define CDISABLE	bl __libc_disable_asynccancel@local
 # else
-#  define CENABLE	bl __librt_enable_asynccancel@local
-#  define CDISABLE	bl __librt_disable_asynccancel@local
+#  define CENABLE	JUMPTARGET(__librt_enable_asynccancel)
+#  define CDISABLE	JUMPTARGET(__librt_disable_asynccancel)
 # endif
 
 # ifdef HAVE_TLS_SUPPORT


	Jakub


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