{
if (this->input_argument_->is_group())
{
- assert(this->input_group_ == NULL);
+ gold_assert(this->input_group_ == NULL);
this->do_group(workqueue);
return;
}
- Input_file* input_file = new Input_file(this->input_argument_->file());
+ Input_file* input_file = new Input_file(&this->input_argument_->file());
input_file->open(this->options_, this->dirpath_);
// Read enough of the file to pick up the entire ELF header.
++p)
{
const Input_argument* arg = &*p;
- assert(arg->is_file());
+ gold_assert(arg->is_file());
Task_token* next_blocker = new Task_token();
next_blocker->add_blocker();
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;
}