include/elf/
[deliverable/binutils-gdb.git] / gold / plugin.cc
index 7d5b1b7f46356794cb9db0e752bdbbb1974817a9..455037107c65a0efb218bed5072affe2fd71a8dd 100644 (file)
@@ -1,4 +1,4 @@
-// plugin.c -- plugin manager for gold      -*- C++ -*-
+// plugin.cc -- plugin manager for gold      -*- C++ -*-
 
 // Copyright 2008, 2009 Free Software Foundation, Inc.
 // Written by Cary Coutant <ccoutant@google.com>.
@@ -506,7 +506,12 @@ Pluginobj::include_comdat_group(std::string comdat_key, Layout* layout)
   // If this is the first time we've seen this comdat key, ask the
   // layout object whether it should be included.
   if (ins.second)
-    ins.first->second = layout->add_comdat(NULL, 1, comdat_key, true);
+    {
+      Kept_section to_add(NULL, 1, true);
+      ins.first->second = layout->find_or_add_kept_section(comdat_key,
+                                                          &to_add,
+                                                          NULL);
+    }
 
   return ins.first->second;
 }
@@ -544,17 +549,10 @@ Sized_pluginobj<size, big_endian>::do_layout(Symbol_table*, Layout*,
 
 // Add the symbols to the symbol table.
 
-template<int size, bool big_endian>
-void
-Sized_pluginobj<size, big_endian>::do_add_symbols(Symbol_table*,
-                                                  Read_symbols_data*)
-{
-  gold_unreachable();
-}
-
 template<int size, bool big_endian>
 void
 Sized_pluginobj<size, big_endian>::do_add_symbols(Symbol_table* symtab,
+                                                  Read_symbols_data*,
                                                   Layout* layout)
 {
   const int sym_size = elfcpp::Elf_sizes<size>::sym_size;
@@ -756,47 +754,8 @@ Sized_pluginobj<size, big_endian>::do_get_global_symbol_counts(const Symbol_tabl
   gold_unreachable();
 }
 
-// Class Add_plugin_symbols.
-
-Add_plugin_symbols::~Add_plugin_symbols()
-{
-  if (this->this_blocker_ != NULL)
-    delete this->this_blocker_;
-  // next_blocker_ is deleted by the task associated with the next
-  // input file.
-}
-
-// We are blocked by this_blocker_.  We block next_blocker_.  We also
-// lock the file.
-
-Task_token*
-Add_plugin_symbols::is_runnable()
-{
-  if (this->this_blocker_ != NULL && this->this_blocker_->is_blocked())
-    return this->this_blocker_;
-  if (this->obj_->is_locked())
-    return this->obj_->token();
-  return NULL;
-}
-
-void
-Add_plugin_symbols::locks(Task_locker* tl)
-{
-  tl->add(this, this->next_blocker_);
-  tl->add(this, this->obj_->token());
-}
-
-// Add the symbols in the object to the symbol table.
-
-void
-Add_plugin_symbols::run(Workqueue*)
-{
-  this->obj_->add_symbols(this->symtab_, this->layout_);
-}
-
 // Class Plugin_finish.  This task runs after all replacement files have
-// been added.  It calls Layout::layout for any deferred sections and
-// calls each plugin's cleanup handler.
+// been added.  It calls each plugin's cleanup handler.
 
 class Plugin_finish : public Task
 {
@@ -828,7 +787,6 @@ class Plugin_finish : public Task
   {
     Plugin_manager* plugins = parameters->options().plugins();
     gold_assert(plugins != NULL);
-    plugins->layout_deferred_objects();
     plugins->cleanup();
   }
 
This page took 0.02425 seconds and 4 git commands to generate.