Fix MIPS GOT when global symbols are forced to local visibility.
authorVladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
Tue, 24 Jan 2017 01:12:10 +0000 (17:12 -0800)
committerCary Coutant <ccoutant@gmail.com>
Tue, 24 Jan 2017 01:12:10 +0000 (17:12 -0800)
gold/
PR gold/21054
* mips.cc (Mips_got_info::record_global_got_symbol): Don't add symbol
to the dynamic symbol table if it is forced to local visibility.
(Target_mips::do_finalize_sections): Don't add __RLD_MAP symbol to the
dynamic symbol table if it is forced to local visibility.

gold/ChangeLog
gold/mips.cc

index b357d88ac648373c3c39a0868171e3fdef386c23..c074564e60fb18513576cc9179468e0c65aaab61 100644 (file)
@@ -1,3 +1,11 @@
+2017-01-23  Vladimir Radosavljevic  <Vladimir.Radosavljevic@imgtec.com>
+
+       PR gold/21054
+       * mips.cc (Mips_got_info::record_global_got_symbol): Don't add symbol
+       to the dynamic symbol table if it is forced to local visibility.
+       (Target_mips::do_finalize_sections): Don't add __RLD_MAP symbol to the
+       dynamic symbol table if it is forced to local visibility.
+
 2017-01-20  Nick Clifton  <nickc@redhat.com>
 
        * aarch64.cc (Stub_template_repertoire): Change ST_E_835769_INSNS
index 4f505744fb7c51b7a9d57ff4e62aefd2b348e769..ca3dd00545149f1625fe3223dee21bb02f0325bf 100644 (file)
@@ -5627,7 +5627,7 @@ Mips_got_info<size, big_endian>::record_global_got_symbol(
     mips_sym->set_got_not_only_for_calls();
 
   // A global symbol in the GOT must also be in the dynamic symbol table.
-  if (!mips_sym->needs_dynsym_entry())
+  if (!mips_sym->needs_dynsym_entry() && !mips_sym->is_forced_local())
     {
       switch (mips_sym->visibility())
         {
@@ -9781,7 +9781,8 @@ Target_mips<size, big_endian>::do_finalize_sections(Layout* layout,
                                             elfcpp::STV_DEFAULT, 0,
                                             false, false);
 
-        rld_map->set_needs_dynsym_entry();
+        if (!rld_map->is_forced_local())
+          rld_map->set_needs_dynsym_entry();
 
         if (!parameters->options().pie())
           // This member holds the absolute address of the debug pointer.
This page took 0.03573 seconds and 4 git commands to generate.