This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_28-branch] Fix MIPS GOT when global symbols are forced to local visibility.
- From: Cary Coutant <ccoutant at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 24 Jan 2017 01:22:38 -0000
- Subject: [binutils-gdb/binutils-2_28-branch] Fix MIPS GOT when global symbols are forced to local visibility.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=961798ea2ba2f41892ece3695e681bf71df08eba
commit 961798ea2ba2f41892ece3695e681bf71df08eba
Author: Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
Date: Mon Jan 23 17:12:10 2017 -0800
Fix MIPS GOT when global symbols are forced to local visibility.
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.
Diff:
---
gold/ChangeLog | 8 ++++++++
gold/mips.cc | 5 +++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 787fb6e..3129086 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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-13 H.J. Lu <hongjiu.lu@intel.com>
PR gold/21040
diff --git a/gold/mips.cc b/gold/mips.cc
index 4f50574..ca3dd00 100644
--- a/gold/mips.cc
+++ b/gold/mips.cc
@@ -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.