Can now do a full static link of hello, world in C or C++
[platform/upstream/binutils.git] / gold / common.h
1 // common.h -- handle common symbols for gold   -*- C++ -*-
2
3 #ifndef GOLD_COMMON_H
4 #define GOLD_COMMON_H
5
6 #include "workqueue.h"
7
8 namespace gold
9 {
10
11 class General_options;
12 class Symbol_table;
13
14 // This task is used to allocate the common symbols.
15
16 class Allocate_commons_task : public Task
17 {
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   { }
25
26   // The standard Task methods.
27
28   Is_runnable_type
29   is_runnable(Workqueue*);
30
31   Task_locker*
32   locks(Workqueue*);
33
34   void
35   run(Workqueue*);
36
37  private:
38   class Allocate_commons_locker;
39
40   const General_options& options_;
41   Symbol_table* symtab_;
42   Layout* layout_;
43   Task_token* symtab_lock_;
44   Task_token* blocker_;
45 };
46
47 } // End namespace gold.
48
49 #endif // !defined(GOLD_COMMON_H)