From 8d6d383d7cb7438e29207f3bc7c87130c97411e6 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 30 Dec 2009 07:40:01 +0000 Subject: [PATCH] PR 10450 * symtab.h (Symbol::needs_dynsym_entry): A symbol in both a regular and a dynamic object only needs a dynamic symbol table entry if it is externally visible. --- gold/ChangeLog | 5 +++++ gold/symtab.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index a8cd1cbf11b..95160724c26 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,10 @@ 2009-12-29 Ian Lance Taylor + PR 10450 + * symtab.h (Symbol::needs_dynsym_entry): A symbol in both a + regular and a dynamic object only needs a dynamic symbol table + entry if it is externally visible. + PR 10450 * i386.cc (class Target_i386): Initialize global_offset_table_ in constructor. Add global_offset_table_ field. diff --git a/gold/symtab.h b/gold/symtab.h index ed105c7a68a..cac7beed861 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -261,7 +261,9 @@ class Symbol needs_dynsym_entry() const { return (this->needs_dynsym_entry_ - || (this->in_reg() && this->in_dyn())); + || (this->in_reg() + && this->in_dyn() + && this->is_externally_visible())); } // Mark this symbol as needing an entry in the dynamic symbol table. -- 2.30.2