Fix problem where bss symbols for copy relocations are marked local.
authorCary Coutant <ccoutant@gmail.com>
Sat, 14 Nov 2015 19:04:01 +0000 (11:04 -0800)
committerCary Coutant <ccoutant@gmail.com>
Sat, 14 Nov 2015 19:04:01 +0000 (11:04 -0800)
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.

gold/ChangeLog
gold/symtab.cc

index 2b96de547d5cec1c3f58558eeb645ddd4326db55..b1a022c7218863a073e728e18084e47a0a48f265 100644 (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>
 
index 6d107a8b634c1aed3f82f2347689f4a28b5f2b70..22a44e0c55d2fa6ebaeba11107f5b8d0b9ccfeda 100644 (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;