OSDN Git Service

PR middle-end/30174
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 Feb 2007 21:15:15 +0000 (21:15 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 Feb 2007 21:15:15 +0000 (21:15 +0000)
* varasm.c (notice_global_symbol): Treat global objects as weak when
flag_shlib is true.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121551 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/varasm.c

index b6ccf37..f864273 100644 (file)
@@ -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.
index 48055cf..c2ae6e2 100644 (file)
@@ -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)