elfcpp/ChangeLog:
[deliverable/binutils-gdb.git] / gold / readsyms.cc
index d8af99bd39b0f48b6bc810f460409f9feb109424..1cec3b374631e4af91c37eb5c49eeaddff4d5ffc 100644 (file)
@@ -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_;
 }
 
This page took 0.026004 seconds and 4 git commands to generate.