]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aix: Use assemble_name to output BSS section name.
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 2 Jun 2021 17:32:45 +0000 (13:32 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sun, 6 Jun 2021 20:40:02 +0000 (16:40 -0400)
The code to emit BSS CSECT needs to support user assembler name.

* config/rs6000/rs6000.c (rs6000_xcoff_asm_output_aligned_decl_common):
Use assemble_name to output BSS section name.

gcc/config/rs6000/rs6000.c

index 835af7708f915898c4b6f73588d606d43ce3a2c2..b01bb5c8191c466bb06b57278b78ce37ef154369 100644 (file)
@@ -21654,10 +21654,16 @@ rs6000_xcoff_asm_output_aligned_decl_common (FILE *stream,
 
       /* Globalize TLS BSS.  */
       if (TREE_PUBLIC (decl) && DECL_THREAD_LOCAL_P (decl))
-       fprintf (stream, "\t.globl %s\n", name);
+       {
+         fputs (GLOBAL_ASM_OP, stream);
+         assemble_name (stream, name);
+         fputc ('\n', stream);
+       }
 
       /* Switch to section and skip space.  */
-      fprintf (stream, "\t.csect %s,%u\n", name, align2);
+      fputs ("\t.csect ", stream);
+      assemble_name (stream, name);
+      fprintf (stream, ",%u\n", align2);
       ASM_DECLARE_OBJECT_NAME (stream, name, decl);
       ASM_OUTPUT_SKIP (stream, size ? size : 1);
       return;