]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gold/i386.cc
2006-09-29 H.J. Lu <hongjiu.lu@intel.com>
[thirdparty/binutils-gdb.git] / gold / i386.cc
CommitLineData
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
8namespace
9{
10
11using namespace gold;
12
13// The i386 target class.
14
15class Target_i386 : public Sized_target<32, false>
16{
17 public:
18 Target_i386()
75f65a3e 19 : Sized_target<32, false>(&i386_info)
14bfc3f5 20 { }
75f65a3e
ILT
21
22 private:
23 static const Target::Target_info i386_info;
24};
25
26const Target::Target_info Target_i386::i386_info =
27{
28 32, // size
29 false, // is_big_endian
30 false, // has_make_symbol
31 false, // has_resolve,
32 0x08048000, // text_segment_address,
33 0x1000, // abi_pagesize
34 0x1000 // common_pagesize
14bfc3f5
ILT
35};
36
37// The selector for i386 object files.
38
39class Target_selector_i386 : public Target_selector
40{
41public:
42 Target_selector_i386()
43 : Target_selector(elfcpp::EM_386, 32, false)
44 { }
45
46 Target*
47 recognize(int machine, int osabi, int abiversion) const;
48};
49
50// Recognize an i386 object file when we already know that the machine
51// number is EM_386.
52
53Target*
54Target_selector_i386::recognize(int, int, int) const
55{
56 return new Target_i386();
57}
58
59Target_selector_i386 target_selector_i386;
60
61} // End anonymous namespace.