return NULL;
}
- Object *obj = make_elf_object((std::string(this->input_file_->filename())
+ Object* obj = make_elf_object((std::string(this->input_file_->filename())
+ "(" + member_name + ")"),
input_file, memoff, ehdr, read_size,
punconfigured);
std::map<off_t, Archive_member>::const_iterator p = this->members_.find(off);
if (p != this->members_.end())
{
- Object *obj = p->second.obj_;
+ Object* obj = p->second.obj_;
- Read_symbols_data *sd = p->second.sd_;
+ Read_symbols_data* sd = p->second.sd_;
if (mapfile != NULL)
mapfile->report_include_archive_member(obj->name(), sym, why);
if (input_objects->add_object(obj))
while (i < this->members_.size())
{
const Archive_member& member = this->members_[i];
- Object *obj = member.obj_;
+ Object* obj = member.obj_;
std::string why;
// Skip files with no symbols. Plugin objects have
else
{
if (member.sd_ != NULL)
- delete member.sd_;
+ {
+ // The file must be locked in order to destroy the views
+ // associated with it.
+ gold_assert(obj != NULL);
+ obj->lock(this->task_);
+ delete member.sd_;
+ obj->unlock(this->task_);
+ }
}
this->members_[i] = this->members_.back();
layout->incremental_inputs()->report_object(obj, NULL);
obj->layout(symtab, layout, sd);
obj->add_symbols(symtab, sd, layout);
- // Unlock the file for the next task.
- obj->unlock(this->task_);
}
delete sd;
+ // Unlock the file for the next task.
+ obj->unlock(this->task_);
}
// Print statistical information to stderr. This is used for --stats.
Task_token*
Add_lib_group_symbols::is_runnable()
{
+ if (this->readsyms_blocker_ != NULL && this->readsyms_blocker_->is_blocked())
+ return this->readsyms_blocker_;
if (this->this_blocker_ != NULL && this->this_blocker_->is_blocked())
return this->this_blocker_;
return NULL;