Commit | Line | Data |
---|---|---|
14bfc3f5 ILT |
1 | // i386.cc -- i386 target support for gold. |
2 | ||
3 | #include "gold.h" | |
4 | #include "elfcpp.h" | |
5 | #include "target.h" | |
6 | #include "target-select.h" | |
7 | ||
8 | namespace | |
9 | { | |
10 | ||
11 | using namespace gold; | |
12 | ||
13 | // The i386 target class. | |
14 | ||
15 | class Target_i386 : public Sized_target<32, false> | |
16 | { | |
17 | public: | |
18 | Target_i386() | |
19 | : Sized_target<32, false>(false, false) | |
20 | { } | |
21 | }; | |
22 | ||
23 | // The selector for i386 object files. | |
24 | ||
25 | class Target_selector_i386 : public Target_selector | |
26 | { | |
27 | public: | |
28 | Target_selector_i386() | |
29 | : Target_selector(elfcpp::EM_386, 32, false) | |
30 | { } | |
31 | ||
32 | Target* | |
33 | recognize(int machine, int osabi, int abiversion) const; | |
34 | }; | |
35 | ||
36 | // Recognize an i386 object file when we already know that the machine | |
37 | // number is EM_386. | |
38 | ||
39 | Target* | |
40 | Target_selector_i386::recognize(int, int, int) const | |
41 | { | |
42 | return new Target_i386(); | |
43 | } | |
44 | ||
45 | Target_selector_i386 target_selector_i386; | |
46 | ||
47 | } // End anonymous namespace. |