From: Dave Korn Date: Sun, 2 May 2010 23:51:59 +0000 (+0000) Subject: winnt.c (i386_pe_binds_local_p): Handle weak decls. X-Git-Tag: releases/gcc-4.6.0~7530 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2dfccd834ce3af40eb7623d02cfead60e5bb4401;p=thirdparty%2Fgcc.git winnt.c (i386_pe_binds_local_p): Handle weak decls. * config/i386/winnt.c (i386_pe_binds_local_p): Handle weak decls. From-SVN: r158983 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49fe65828575..b528def1c2b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2010-05-03 Dave Korn + + * config/i386/winnt.c (i386_pe_binds_local_p): Handle weak decls. + 2010-05-02 Uros Bizjak * config/i386/i386.c (ix86_target_string): Output 'flags', not 'isa', diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index f7f4d2845ba2..34d3f427d237 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -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; }