--- ./gcc/config/rs6000/rs6000.cc_orig	2023-06-03 08:29:06
+++ ./gcc/config/rs6000/rs6000.cc	2023-06-03 08:33:37
@@ -21180,10 +21180,10 @@
 #if HAVE_AS_TLS
       if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL_P (decl))
 	{
-	  if (bss_initializer_p (decl))
-	    return tls_comm_section;
-	  else if (TREE_PUBLIC (decl))
-	    return tls_data_section;
+	  if (TREE_PUBLIC (decl))
+	     return tls_data_section;
+	  else if (bss_initializer_p (decl))
+	     return tls_comm_section;
 	  else
 	    return tls_private_data_section;
 	}
