aboutsummaryrefslogtreecommitdiff
path: root/gold/readsyms.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/readsyms.cc')
-rw-r--r--gold/readsyms.cc29
1 files changed, 15 insertions, 14 deletions
diff --git a/gold/readsyms.cc b/gold/readsyms.cc
index d8af99b..1cec3b3 100644
--- a/gold/readsyms.cc
+++ b/gold/readsyms.cc
@@ -302,12 +302,6 @@ Read_symbols::do_read_symbols(Workqueue* workqueue)
this->dirpath_, this);
arch->setup();
- if (this->layout_->incremental_inputs())
- {
- const Input_argument* ia = this->input_argument_;
- this->layout_->incremental_inputs()->report_archive(ia, arch);
- }
-
// Unlock the archive so it can be used in the next task.
arch->unlock(this);
@@ -389,12 +383,6 @@ Read_symbols::do_read_symbols(Workqueue* workqueue)
Read_symbols_data* sd = new Read_symbols_data;
obj->read_symbols(sd);
- if (this->layout_->incremental_inputs())
- {
- const Input_argument* ia = this->input_argument_;
- this->layout_->incremental_inputs()->report_object(ia, obj);
- }
-
// Opening the file locked it, so now we need to unlock it. We
// need to unlock it before queuing the Add_symbols task,
// because the workqueue doesn't know about our lock on the
@@ -599,6 +587,10 @@ Add_symbols::run(Workqueue*)
}
else
{
+ Incremental_inputs* incremental_inputs =
+ this->layout_->incremental_inputs();
+ if (incremental_inputs != NULL)
+ incremental_inputs->report_object(this->object_, NULL);
this->object_->layout(this->symtab_, this->layout_, this->sd_);
this->object_->add_symbols(this->symtab_, this->sd_, this->layout_);
delete this->sd_;
@@ -688,11 +680,20 @@ Finish_group::run(Workqueue*)
}
}
- // Delete all the archives now that we no longer need them.
+ // Now that we're done with the archives, record the incremental layout
+ // information, then delete them.
for (Input_group::const_iterator p = this->input_group_->begin();
p != this->input_group_->end();
++p)
- delete *p;
+ {
+ // For an incremental link, finish recording the layout information.
+ Incremental_inputs* incremental_inputs =
+ this->layout_->incremental_inputs();
+ if (incremental_inputs != NULL)
+ incremental_inputs->report_archive_end(*p);
+
+ delete *p;
+ }
delete this->input_group_;
}