aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/varasm.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b6ccf37..f864273 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR middle-end/30174
+ * varasm.c (notice_global_symbol): Treat global objects as weak when
+ flag_shlib is true.
+
2007-02-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* emit-rtl.c (dconstpi): Delete.
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 48055cf..c2ae6e2 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)