This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_26-branch] Fix problem where bss symbols for copy relocations are marked local.


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

commit 3d3ef1fccd86e7b18609a30187027d271c7fc8a5
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Sat Nov 14 11:04:01 2015 -0800

    Fix problem where bss symbols for copy relocations are marked local.
    
    gold/
    	PR gold/19244
    	PR gold/18548
    	* symtab.cc (Symbol_table::do_define_in_output_data): Check for forced
    	local symbols only for predefined symbols.

Diff:
---
 gold/ChangeLog | 9 +++++++++
 gold/symtab.cc | 5 +++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index 2b96de5..32bb7ee 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,12 @@
+2015-12-10  Alan Modra  <amodra@gmail.com>
+
+	Apply from master.
+	2015-11-14  Cary Coutant  <ccoutant@gmail.com>
+	PR gold/19244
+	PR gold/18548
+	* symtab.cc (Symbol_table::do_define_in_output_data): Check for forced
+	local symbols only for predefined symbols.
+
 2015-11-11  Alan Modra  <amodra@gmail.com>
 	    Peter Bergner <bergner@vnet.ibm.com>
 
diff --git a/gold/symtab.cc b/gold/symtab.cc
index 6d107a8..22a44e0 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -1986,8 +1986,9 @@ Symbol_table::do_define_in_output_data(
     return sym;
   else
     {
-      if (binding == elfcpp::STB_LOCAL
-	  || this->version_script_.symbol_is_local(name))
+      if (defined == PREDEFINED
+	  && (binding == elfcpp::STB_LOCAL
+	      || this->version_script_.symbol_is_local(name)))
 	this->force_local(oldsym);
       delete sym;
       return oldsym;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]