This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: fix powerpc64 libjava failures


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


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