backport: rs6000.c (rs6000_declare_alias): Rename and globalize both the symbol and the "dot" symbol for function descriptors.

Backport from mainline
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.

From-SVN: r230951
This commit is contained in:
David Edelsohn 2015-11-26 13:32:38 +00:00 committed by David Edelsohn
parent 35a7afe1ac
commit 78a5972fd9
2 changed files with 23 additions and 10 deletions

View File

@ -1,3 +1,12 @@
2015-11-26 David Edelsohn <dje.gcc@gmail.com>
Backport from mainline
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-26 Ilya Enkovich <enkovich.gnu@gmail.com>
Backport from mainline r230938.

View File

@ -30263,13 +30263,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);
}
@ -30283,14 +30285,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);
}