diff mbox series

[AIX] Use assemble_name to output BSS section name.

Message ID CAGWvnyksxdmp9TTR5=2YLUanpWwh2USizK3p9du_k6eTgWEvGA@mail.gmail.com
State New
Headers show
Series [AIX] Use assemble_name to output BSS section name. | expand

Commit Message

David Edelsohn June 6, 2021, 8:35 p.m. UTC
aix: Use assemble_name to output BSS section name.

            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.
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 835af7708f9..b01bb5c8191 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -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;