From: davek Date: Sun, 2 May 2010 23:51:59 +0000 (+0000) Subject: * config/i386/winnt.c (i386_pe_binds_local_p): Handle weak decls. X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=e17f954a60ad3e52c2434ff2fd1555a9de09229d;ds=sidebyside * config/i386/winnt.c (i386_pe_binds_local_p): Handle weak decls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158983 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49fe6582857..b528def1c2b 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 f7f4d2845ba..34d3f427d23 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; }