From: David Edelsohn Date: Mon, 16 Feb 2015 15:33:09 +0000 (-0500) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=403697abae1166766b3e4681487a5dfcfef2ce52;p=gcc.git [multiple changes] 2015-02-16 Michael Haubenwallner David Edelsohn PR target/65058 * config/rs6000/rs6000.c (rs6000_output_symbol_ref): Append storage mapping class to external variable or function reference. * config/rs6000/xcoff.h (ASM_OUTPUT_EXTERNAL): Do not append storage mapping class. 2015-02-16 David Eelsohn PR target/53348 * config/rs6000/rs6000.c (rs6000_declare_alias): Only use ASM_WEAKEN_DECL if defined. From-SVN: r220737 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e049c99a791..04ac1192bd1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2015-02-16 Michael Haubenwallner + David Edelsohn + + PR target/65058 + * config/rs6000/rs6000.c (rs6000_output_symbol_ref): Append storage + mapping class to external variable or function reference. + * config/rs6000/xcoff.h (ASM_OUTPUT_EXTERNAL): Do not append storage + mapping class. + +2015-02-16 David Eelsohn + + PR target/53348 + * config/rs6000/rs6000.c (rs6000_declare_alias): Only use + ASM_WEAKEN_DECL if defined. + 2015-02-16 Richard Biener PR lto/65015 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 86ef0fe0fc6..e482547aecc 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -26030,6 +26030,20 @@ rs6000_output_symbol_ref (FILE *file, rtx x) section. */ const char *name = XSTR (x, 0); + tree decl = SYMBOL_REF_DECL (x); + if (decl /* sync condition with assemble_external () */ + && DECL_P (decl) && DECL_EXTERNAL (decl) && TREE_PUBLIC (decl) + && (TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FUNCTION_DECL) + && name[strlen (name) - 1] != ']') + { + name = concat (name, + (TREE_CODE (decl) == FUNCTION_DECL + ? "[DS]" : "[UA]"), + NULL); + XSTR (x, 0) = name; + } + if (VTABLE_NAME_P (name)) { RS6000_OUTPUT_BASENAME (file, name); @@ -30081,8 +30095,10 @@ rs6000_declare_alias (struct symtab_node *n, void *d) RS6000_OUTPUT_BASENAME (data->file, buffer); putc ('\n', data->file); } +#ifdef ASM_WEAKEN_DECL else if (DECL_WEAK (n->decl) && !data->function_descriptor) ASM_WEAKEN_DECL (data->file, n->decl, name, NULL); +#endif } else { diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h index 6dc1207aba8..db024fcacee 100644 --- a/gcc/config/rs6000/xcoff.h +++ b/gcc/config/rs6000/xcoff.h @@ -170,15 +170,6 @@ putc ('\n', FILE); \ fprintf(FILE, "\t.rename .%s,\".%s\"\n", buffer, NAME); \ } \ - if ((TREE_CODE (DECL) == VAR_DECL \ - || TREE_CODE (DECL) == FUNCTION_DECL) \ - && (NAME)[strlen (NAME) - 1] != ']') \ - { \ - XSTR (_symref, 0) = concat (XSTR (_symref, 0), \ - (TREE_CODE (DECL) == FUNCTION_DECL \ - ? "[DS]" : "[RW]"), \ - NULL); \ - } \ } /* This is how to output a reference to a user-level label named NAME.