diff options
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index 2448bf8..61b6895 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -45,15 +45,8 @@ Layout_task::locks(Workqueue*) void Layout_task::run(Workqueue* workqueue) { - // Nothing ever frees this. - Layout* layout = new Layout(this->options_); - layout->init(); - for (Input_objects::Object_list::const_iterator p = - this->input_objects_->begin(); - p != this->input_objects_->end(); - ++p) - (*p)->layout(layout); - off_t file_size = layout->finalize(this->input_objects_, this->symtab_); + off_t file_size = this->layout_->finalize(this->input_objects_, + this->symtab_); // Now we know the final size of the output file and we know where // each piece of information goes. @@ -62,7 +55,7 @@ Layout_task::run(Workqueue* workqueue) // Queue up the final set of tasks. gold::queue_final_tasks(this->options_, this->input_objects_, - this->symtab_, layout, workqueue, of); + this->symtab_, this->layout_, workqueue, of); } // Layout methods. @@ -72,13 +65,6 @@ Layout::Layout(const General_options& options) section_name_map_(), segment_list_(), section_list_(), special_output_list_() { -} - -// Prepare for doing layout. - -void -Layout::init() -{ // Make space for more than enough segments for a typical file. // This is just for efficiency--it's OK if we wind up needing more. segment_list_.reserve(12); |