From: Cary Coutant Date: Sat, 14 Nov 2015 19:04:01 +0000 (-0800) Subject: Fix problem where bss symbols for copy relocations are marked local. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db1ff0288b923bc17d2408a6172a016b7ba0a6a4;p=binutils-gdb.git 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 --git a/gold/ChangeLog b/gold/ChangeLog index 2b96de547d5..b1a022c7218 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2015-11-14 Cary Coutant + + 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 Peter Bergner diff --git a/gold/symtab.cc b/gold/symtab.cc index 6d107a8b634..22a44e0c55d 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;