rs6000.c (rs6000_select_rtx_section): Put symbolic constants in .data when -fpic.
authorRichard Henderson <rth@redhat.com>
Thu, 21 Mar 2002 18:30:09 +0000 (10:30 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 21 Mar 2002 18:30:09 +0000 (10:30 -0800)
        * config/rs6000/rs6000.c (rs6000_select_rtx_section): Put symbolic
        constants in .data when -fpic.

From-SVN: r51134

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

index 30ebdb5fe3e56ca81bdba5c5e98bf53a42f010d9..dcdee3ff9b886b06b7dd7341411371e7c65c435c 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-21  Richard Henderson  <rth@redhat.com>
+
+       * config/rs6000/rs6000.c (rs6000_select_rtx_section): Put symbolic
+       constants in .data when -fpic.
+
 2002-03-21  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
 
        * doc/contrib.texi (Contributors): Use GNU/Linux instead of Linux
index db5499983a2afaa27490bb0b68ce55c688949ad1..63275b18c0391a02b2ef7dacec90053a799bb4df 100644 (file)
@@ -10787,6 +10787,11 @@ rs6000_select_rtx_section (mode, x)
 {
   if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (x, mode))
     toc_section ();
+  else if (flag_pic
+          && (GET_CODE (x) == SYMBOL_REF
+              || GET_CODE (x) == LABEL_REF
+              || GET_CODE (x) == CONST))
+    data_section ();
   else
     const_section ();
 }