diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 286aed55344..64e3421c4d1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-09-04 David Edelsohn + + * config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Only emit + lglobl if not weak. + 2013-09-04 Easwaran Raman PR middle-end/57370 diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 5acedfc86a2..a5a7a859426 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -2139,12 +2139,15 @@ extern int toc_initialized; } \ else if (TARGET_XCOFF) \ { \ - fputs ("\t.lglobl\t.", FILE); \ - RS6000_OUTPUT_BASENAME (FILE, alias); \ - putc ('\n', FILE); \ - fputs ("\t.lglobl\t", FILE); \ - RS6000_OUTPUT_BASENAME (FILE, alias); \ - putc ('\n', FILE); \ + if (!RS6000_WEAK || !DECL_WEAK (DECL)) \ + { \ + fputs ("\t.lglobl\t.", FILE); \ + RS6000_OUTPUT_BASENAME (FILE, alias); \ + putc ('\n', FILE); \ + fputs ("\t.lglobl\t", FILE); \ + RS6000_OUTPUT_BASENAME (FILE, alias); \ + putc ('\n', FILE); \ + } \ } \ fputs ("\t.set\t.", FILE); \ RS6000_OUTPUT_BASENAME (FILE, alias); \