summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 48055cf65fd..c2ae6e23f1c 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1323,7 +1323,7 @@ notice_global_symbol (tree decl)
/* We win when global object is found, but it is useful to know about weak
symbol as well so we can produce nicer unique names. */
- if (DECL_WEAK (decl) || DECL_ONE_ONLY (decl))
+ if (DECL_WEAK (decl) || DECL_ONE_ONLY (decl) || flag_shlib)
type = &weak_global_object_name;
if (!*type)