aboutsummaryrefslogtreecommitdiff
path: root/gold/resolve.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r--gold/resolve.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc
index 9b442e2..8cc637a 100644
--- a/gold/resolve.cc
+++ b/gold/resolve.cc
@@ -915,6 +915,10 @@ Symbol::override_base_with_special(const Symbol* from)
bool same_name = this->name_ == from->name_;
gold_assert(same_name || this->has_alias());
+ // If we are overriding an undef, remember the original binding.
+ if (this->is_undefined())
+ this->set_undef_binding(this->binding_);
+
this->source_ = from->source_;
switch (from->source_)
{