rs6000.c (rs6000_legitimize_tls_address): Explain peculiarity of GOT/TOC section...
authorAlan Modra <amodra@bigpond.net.au>
Mon, 24 Oct 2005 01:57:45 +0000 (01:57 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Mon, 24 Oct 2005 01:57:45 +0000 (11:27 +0930)
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Explain
peculiarity of GOT/TOC section usage.

From-SVN: r105836

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index f5ad5343cd10e32a616722244fd2e2ba7a1ddd0c..54db2b25b4e0caecdce333f91d32e54581b1988c 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-24  Alan Modra  <amodra@bigpond.net.au>
+
+       * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Explain
+       peculiarity of GOT/TOC section usage.
+
 2005-10-23  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR objc/24435
index 4f8e48947b9337eb817ab821af4ee4f174ff4c5f..3c33a81c0caaec0b077b60245076c8732830041a 100644 (file)
@@ -2978,6 +2978,11 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model)
     {
       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