Index: rs6000.c
===================================================================
--- rs6000.c    (revision 194278)
+++ rs6000.c    (working copy)
@@ -25886,6 +25886,29 @@
         ? "\t.long _section_.text\n" : "\t.llong _section_.text\n",
         asm_out_file);
 }
+
+static void
+rs6000_xcoff_encode_section_info (tree decl, rtx rtl, int first)
+{
+  rtx symbol;
+  int flags;
+
+  default_encode_section_info (decl, rtl, first);
+
+  /* Careful not to prod global register variables.  */
+  if (!MEM_P (rtl))
+    return;
+  symbol = XEXP (rtl, 0);
+  if (GET_CODE (symbol) != SYMBOL_REF)
+    return;
+
+  flags = SYMBOL_REF_FLAGS (symbol);
+
+  if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL_P (decl))
+    flags &= ~SYMBOL_FLAG_HAS_BLOCK_INFO;
+
+  SYMBOL_REF_FLAGS (symbol) = flags;
+}
 #endif /* TARGET_XCOFF */

 /* Compute a (partial) cost for rtx X.  Return true if the complete
