This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix powerpc64 libjava failures
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Edelsohn <dje at watson dot ibm dot com>
- Date: Mon, 24 Oct 2005 11:27:46 +0930
- Subject: Re: fix powerpc64 libjava failures
- References: <20051021073314.GA8600@bubble.grove.modra.org>
On Fri, Oct 21, 2005 at 05:03:14PM +0930, Alan Modra wrote:
> I'm applying this as obvious to fix the powerpc64-linux libjava
David asked for a comment. Committing mainline.
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Explain
peculiarity of GOT/TOC section usage.
Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.873
diff -u -p -r1.873 rs6000.c
--- gcc/config/rs6000/rs6000.c 21 Oct 2005 07:33:30 -0000 1.873
+++ gcc/config/rs6000/rs6000.c 24 Oct 2005 01:53:36 -0000
@@ -2978,6 +2978,11 @@ rs6000_legitimize_tls_address (rtx addr,
{
rtx r3, got, tga, tmp1, tmp2, eqv;
+ /* We currently use relocations like @got@tlsgd for tls, which
+ means the linker will handle allocation of tls entries, placing
+ them in the .got section. So use a pointer to the .got section,
+ not one to secondary TOC sections used by 64-bit -mminimal-toc,
+ or to secondary GOT sections used by 32-bit -fPIC. */
if (TARGET_64BIT)
got = gen_rtx_REG (Pmode, 2);
else
--
Alan Modra
IBM OzLabs - Linux Technology Centre