Copy in_reg and in_dyn when resolving NAME/VERSION with NAME/NULL.
authorIan Lance Taylor <iant@google.com>
Wed, 29 Aug 2007 03:42:51 +0000 (03:42 +0000)
committerIan Lance Taylor <iant@google.com>
Wed, 29 Aug 2007 03:42:51 +0000 (03:42 +0000)
gold/symtab.cc
gold/symtab.h

index a5701349835001e29f80c3e9cd1db5773902ef5f..68ce3b1efeeaae6287d9a3d3cc3e430775206b0e 100644 (file)
@@ -267,6 +267,10 @@ Symbol_table::resolve(Sized_symbol<size>* to, const Sized_symbol<size>* from,
   esym.put_st_other(from->visibility(), from->nonvis());
   esym.put_st_shndx(from->shndx());
   Symbol_table::resolve(to, esym.sym(), from->object(), version);
+  if (from->in_reg())
+    to->set_in_reg();
+  if (from->in_dyn())
+    to->set_in_dyn();
 }
 
 // Add one symbol from OBJECT to the symbol table.  NAME is symbol
index cba97d0bf9ec1a932f032a9ec92cf0d5d76dab84..15d1f788eb076dbb873040f5a98f8adce6a4120e 100644 (file)
@@ -195,6 +195,11 @@ class Symbol
   set_in_reg()
   { this->in_reg_ = true; }
 
+  // Return whether this symbol has been seen in a dynamic object.
+  bool
+  in_dyn() const
+  { return this->in_dyn_; }
+
   // Mark this symbol as having been seen in a dynamic object.
   void
   set_in_dyn()