This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gold patch committed: Don't put hidden symbols in dynamic symbol table


elflint spotted a real problem: when a STV_HIDDEN symbol appeared in
both a regular object and a dynamic object, gold would put it in the
dynamic symbol table.  That doesn't cause a problem when running the
program, but it makes no sense.  I committed this patch to fix the
problem.

Ian


2009-12-29  Ian Lance Taylor  <iant@google.com>

	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.


Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gold/symtab.h,v
retrieving revision 1.100
diff -p -u -r1.100 symtab.h
--- symtab.h	29 Dec 2009 00:31:48 -0000	1.100
+++ symtab.h	30 Dec 2009 07:38:42 -0000
@@ -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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]