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.
This commit is contained in:
Cary Coutant 2015-11-14 11:04:01 -08:00
parent 895d4275ba
commit db1ff0288b
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,10 @@
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>

View File

@ -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;