aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/xcoff.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/rs6000/xcoff.h')
-rw-r--r--gcc/config/rs6000/xcoff.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h
index 095a566..e60f3fe 100644
--- a/gcc/config/rs6000/xcoff.h
+++ b/gcc/config/rs6000/xcoff.h
@@ -345,9 +345,18 @@ toc_section () \
SYMBOL_REF_FLAG (sym_ref) = 1; \
if (TREE_PUBLIC (DECL)) \
{ \
- fputs ("\t.globl .", FILE); \
- RS6000_OUTPUT_BASENAME (FILE, NAME); \
- putc ('\n', FILE); \
+ if (RS6000_WEAK && DECL_WEAK (decl)) \
+ { \
+ fputs ("\t.weak .", FILE); \
+ RS6000_OUTPUT_BASENAME (FILE, NAME); \
+ putc ('\n', FILE); \
+ } \
+ else \
+ { \
+ fputs ("\t.globl .", FILE); \
+ RS6000_OUTPUT_BASENAME (FILE, NAME); \
+ putc ('\n', FILE); \
+ } \
} \
else \
{ \