[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binutils-cvs
Subject:    [binutils-gdb/binutils-2_27-branch] Don't treat as separate symbols if unversioned symbol is undefin
From:       Cary Coutant <ccoutant () sourceware ! org>
Date:       2016-09-27 19:25:00
Message-ID: 20160927192500.108145.qmail () sourceware ! org
[Download RAW message or body]

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a617f9ddc3e30bca79cd40f4afa90d2851260f38

commit a617f9ddc3e30bca79cd40f4afa90d2851260f38
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Tue Sep 27 12:08:19 2016 -0700

    Don't treat as separate symbols if unversioned symbol is undefined.
    
    When we see an unversioned symbol reference in a shared library, followed
    by a default definition of the symbol in another shared library, we were
    treating them as separate symbols. That should only happen when both are
    definitions.
    
    gold/
    	PR gold/20238
    	* symtab.cc (Symbol_table::define_default_version): Check that
    	unversioned symbol is defined.

Diff:
---
 gold/ChangeLog | 6 ++++++
 gold/symtab.cc | 1 +
 2 files changed, 7 insertions(+)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index 7e69839..f5005ef 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,9 @@
+2016-09-26  Cary Coutant  <ccoutant@gmail.com>
+
+	PR gold/20238
+	* symtab.cc (Symbol_table::define_default_version): Check that
+	unversioned symbol is defined.
+
 2016-08-23  Roland McGrath  <roland@hack.frob.com>
 
 	* options.h (General_options): Grok -z stack-size.
diff --git a/gold/symtab.cc b/gold/symtab.cc
index b31794a..c872f47 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -882,6 +882,7 @@ Symbol_table::define_default_version(Sized_symbol<size>* sym,
 	;
       else if (pdef->second->is_from_dynobj()
 	       && sym->is_from_dynobj()
+	       && pdef->second->is_defined()
 	       && pdef->second->object() != sym->object())
         ;
       else

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic