merge from gcc
[binutils.git] / gold / common.h
blob75237a6a5c526dc00d57e8d383c6c96626ebb963
1 // common.h -- handle common symbols for gold -*- C++ -*-
3 #ifndef GOLD_COMMON_H
4 #define GOLD_COMMON_H
6 #include "workqueue.h"
8 namespace gold
11 class General_options;
12 class Symbol_table;
14 // This task is used to allocate the common symbols.
16 class Allocate_commons_task : public Task
18 public:
19 Allocate_commons_task(const General_options& options, Symbol_table* symtab,
20 Layout* layout, Task_token* symtab_lock,
21 Task_token* blocker)
22 : options_(options), symtab_(symtab), layout_(layout),
23 symtab_lock_(symtab_lock), blocker_(blocker)
24 { }
26 // The standard Task methods.
28 Is_runnable_type
29 is_runnable(Workqueue*);
31 Task_locker*
32 locks(Workqueue*);
34 void
35 run(Workqueue*);
37 private:
38 class Allocate_commons_locker;
40 const General_options& options_;
41 Symbol_table* symtab_;
42 Layout* layout_;
43 Task_token* symtab_lock_;
44 Task_token* blocker_;
47 } // End namespace gold.
49 #endif // !defined(GOLD_COMMON_H)