From 7f085cafa420d8a90b8d1585d54c1c87c589e12e Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Wed, 25 Nov 2015 12:52:50 +0000 Subject: [PATCH] rs6000.c (rs6000_declare_alias): Rename and globalize both the symbol and the "dot" symbol for function descriptors. * 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 | 6 ++++++ gcc/config/rs6000/rs6000.c | 24 ++++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82d23c0e2a9..932b80c6157 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-25 David Edelsohn + + * 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 * cfgloop.c (find_single_latch): New function, factored out of ... diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 457e944225f..31e9301b758 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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); } -- 2.30.2