aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-03-14 05:57:19 +0000
committerIan Lance Taylor <iant@google.com>2008-03-14 05:57:19 +0000
commitbe3e620119165a017266af64ae310cd6343a370a (patch)
tree57915f9f4f0cdf98cba70ce17782e116ba16dc4e /gold/symtab.cc
parent36cf3ec26ac5ecc440b4fe014404981136778d2d (diff)
downloadgdb-be3e620119165a017266af64ae310cd6343a370a.zip
gdb-be3e620119165a017266af64ae310cd6343a370a.tar.gz
gdb-be3e620119165a017266af64ae310cd6343a370a.tar.bz2
Don't get confused about whether a symbol is the default version if we
see a later reference to it. Add tests for this case.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index 1232d05..b32dcb4 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -643,7 +643,8 @@ Symbol_table::add_from_object(Object* object,
if (!was_common && ret->is_common())
this->commons_.push_back(ret);
- ret->set_is_default(def);
+ if (def)
+ ret->set_is_default();
return ret;
}