]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
winnt.c (i386_pe_binds_local_p): Handle weak decls.
authorDave Korn <dave.korn.cygwin@gmail.com>
Sun, 2 May 2010 23:51:59 +0000 (23:51 +0000)
committerDave Korn <davek@gcc.gnu.org>
Sun, 2 May 2010 23:51:59 +0000 (23:51 +0000)
* config/i386/winnt.c (i386_pe_binds_local_p): Handle weak decls.

From-SVN: r158983

gcc/ChangeLog
gcc/config/i386/winnt.c

index 49fe658285759710c210d38d1c0454f599b6bae1..b528def1c2b38deb8e6156cb22e87d094bb69dbb 100644 (file)
@@ -1,3 +1,7 @@
+2010-05-03  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+       * config/i386/winnt.c (i386_pe_binds_local_p): Handle weak decls.
+
 2010-05-02  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (ix86_target_string): Output 'flags', not 'isa',
index f7f4d2845ba2688a7c13e7c0e4e33330e275960c..34d3f427d237824e03f181fcc101df62c413dd39 100644 (file)
@@ -321,6 +321,11 @@ i386_pe_binds_local_p (const_tree exp)
       && DECL_DLLIMPORT_P (exp))
     return false;
 
+  /* Or a weak one, now that they are supported.  */
+  if ((TREE_CODE (exp) == VAR_DECL || TREE_CODE (exp) == FUNCTION_DECL)
+      && DECL_WEAK (exp))
+    return false;
+
   return true;
 }