This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: ppc32 JUMPTARGET
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ulrich Drepper <drepper at redhat dot com>, Alan Modra <amodra at bigpond dot net dot au>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 23 May 2005 18:56:09 +0200
- Subject: Re: ppc32 JUMPTARGET
- References: <20050517140017.GN27573@bubble.grove.modra.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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