diff options
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 ba3e85e..86828fc 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; } |