aboutsummaryrefslogtreecommitdiff
path: root/gold/resolve.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-22 23:08:22 +0000
committerIan Lance Taylor <iant@google.com>2007-10-22 23:08:22 +0000
commit46fe162319cc0ad598f8aa74495ccde823349da2 (patch)
tree89aa9522a5133a2ee339f480d29f069908315988 /gold/resolve.cc
parent60dc88db8bb295650876632bce467ba703fea555 (diff)
downloadgdb-46fe162319cc0ad598f8aa74495ccde823349da2.zip
gdb-46fe162319cc0ad598f8aa74495ccde823349da2.tar.gz
gdb-46fe162319cc0ad598f8aa74495ccde823349da2.tar.bz2
Fix versions of copied symbols.
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r--gold/resolve.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc
index 8836a3a..7d141c0 100644
--- a/gold/resolve.cc
+++ b/gold/resolve.cc
@@ -620,6 +620,8 @@ Symbol_table::should_override_with_special(const Symbol* to)
void
Symbol::override_base_with_special(const Symbol* from)
{
+ gold_assert(this->name_ == from->name_ || this->has_alias());
+
this->source_ = from->source_;
switch (from->source_)
{
@@ -652,6 +654,20 @@ Symbol::override_base_with_special(const Symbol* from)
// Special symbols are always considered to be regular symbols.
this->in_reg_ = true;
+
+ if (from->needs_dynsym_entry_)
+ this->needs_dynsym_entry_ = true;
+ if (from->needs_dynsym_value_)
+ this->needs_dynsym_value_ = true;
+
+ // We shouldn't see these flags. If we do, we need to handle them
+ // somehow.
+ gold_assert(!from->is_target_special_ || this->is_target_special_);
+ gold_assert(!from->is_forwarder_);
+ gold_assert(!from->has_got_offset_);
+ gold_assert(!from->has_plt_offset_);
+ gold_assert(!from->has_warning_);
+ gold_assert(!from->is_copied_from_dynobj_);
}
// Override a symbol with a special symbol.