rs6000.c (rs6000_declare_alias): Rename and globalize both the symbol and the "dot...
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 25 Nov 2015 12:52:50 +0000 (12:52 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Wed, 25 Nov 2015 12:52:50 +0000 (07:52 -0500)
* config/rs6000/rs6000.c (rs6000_declare_alias): Rename and globalize
both the symbol and the "dot" symbol for function descriptors.  Fix
inversion for rename of symbols with dollar sign.

From-SVN: r230867

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

index 82d23c0e2a9676eed82a31ad1687d675cf6f25ed..932b80c61573ff207b08bcb6598f819722ad63f8 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-25  David Edelsohn  <dje.gcc@gmail.com>
+
+       * config/rs6000/rs6000.c (rs6000_declare_alias): Rename and globalize
+       both the symbol and the "dot" symbol for function descriptors. Fix
+       inversion for rename of symbols with dollar sign.
+
 2015-11-25  Tom de Vries  <tom@codesourcery.com>
 
        * cfgloop.c (find_single_latch): New function, factored out of ...
index 457e944225f38b82fcb7cbaaa98acc9af593c4a6..31e9301b758ddacc19abda470c557fa34c855663 100644 (file)
@@ -31888,13 +31888,15 @@ rs6000_declare_alias (struct symtab_node *n, void *d)
           if (dollar_inside) {
              if (data->function_descriptor)
                 fprintf(data->file, "\t.rename .%s,\".%s\"\n", buffer, name);
-             else
-                fprintf(data->file, "\t.rename %s,\"%s\"\n", buffer, name);
+             fprintf(data->file, "\t.rename %s,\"%s\"\n", buffer, name);
            }
          if (data->function_descriptor)
-           fputs ("\t.globl .", data->file);
-         else
-           fputs ("\t.globl ", data->file);
+           {
+             fputs ("\t.globl .", data->file);
+             RS6000_OUTPUT_BASENAME (data->file, buffer);
+             putc ('\n', data->file);
+           }
+         fputs ("\t.globl ", data->file);
          RS6000_OUTPUT_BASENAME (data->file, buffer);
          putc ('\n', data->file);
        }
@@ -31908,14 +31910,16 @@ rs6000_declare_alias (struct symtab_node *n, void *d)
       if (dollar_inside)
        {
          if (data->function_descriptor)
-            fprintf(data->file, "\t.rename %s,\"%s\"\n", buffer, name);
-         else
             fprintf(data->file, "\t.rename .%s,\".%s\"\n", buffer, name);
+         fprintf(data->file, "\t.rename %s,\"%s\"\n", buffer, name);
        }
       if (data->function_descriptor)
-       fputs ("\t.lglobl .", data->file);
-      else
-       fputs ("\t.lglobl ", data->file);
+       {
+         fputs ("\t.lglobl .", data->file);
+         RS6000_OUTPUT_BASENAME (data->file, buffer);
+         putc ('\n', data->file);
+       }
+      fputs ("\t.lglobl ", data->file);
       RS6000_OUTPUT_BASENAME (data->file, buffer);
       putc ('\n', data->file);
     }