diff options
author | Ian Lance Taylor <iant@google.com> | 2006-12-06 06:28:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2006-12-06 06:28:56 +0000 |
commit | 008db82ec1ba308dba0fcf7767b93c1d56897bcc (patch) | |
tree | 93fef89fd7f3241e644fc770a3e59129a01f3407 /gold/readsyms.cc | |
parent | 8f2e9323f0b754011d0fa089bac65c9d28b73483 (diff) | |
download | binutils-gdb-008db82ec1ba308dba0fcf7767b93c1d56897bcc.tar.gz |
Don't emit symbols seen only in dynamic object, don't read duplicate
dynamic object.
Diffstat (limited to 'gold/readsyms.cc')
-rw-r--r-- | gold/readsyms.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gold/readsyms.cc b/gold/readsyms.cc index ba3e85e70a4..86828fc0a7c 100644 --- a/gold/readsyms.cc +++ b/gold/readsyms.cc @@ -240,10 +240,17 @@ Add_symbols::locks(Workqueue* workqueue) void Add_symbols::run(Workqueue*) { - this->input_objects_->add_object(this->object_); - this->object_->layout(this->options_, this->symtab_, this->layout_, - this->sd_); - this->object_->add_symbols(this->symtab_, this->sd_); + if (!this->input_objects_->add_object(this->object_)) + { + // FIXME: We need to close the descriptor here. + delete this->object_; + } + else + { + this->object_->layout(this->options_, this->symtab_, this->layout_, + this->sd_); + this->object_->add_symbols(this->symtab_, this->sd_); + } delete this->sd_; this->sd_ = NULL; } |