aboutsummaryrefslogtreecommitdiff
path: root/gold/i386.cc
blob: 21dd57a2ed720df908ab768d77ea4ea56dcace65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// i386.cc -- i386 target support for gold.

#include "gold.h"
#include "elfcpp.h"
#include "target.h"
#include "target-select.h"

namespace
{

using namespace gold;

// The i386 target class.

class Target_i386 : public Sized_target<32, false>
{
 public:
  Target_i386()
    : Sized_target<32, false>(&i386_info)
  { }

 private:
  static const Target::Target_info i386_info;
};

const Target::Target_info Target_i386::i386_info =
{
  32,		// size
  false,	// is_big_endian
  false,	// has_make_symbol
  false,	// has_resolve,
  0x08048000,	// text_segment_address,
  0x1000,	// abi_pagesize
  0x1000	// common_pagesize
};

// The selector for i386 object files.

class Target_selector_i386 : public Target_selector
{
public:
  Target_selector_i386()
    : Target_selector(elfcpp::EM_386, 32, false)
  { }

  Target*
  recognize(int machine, int osabi, int abiversion) const;
};

// Recognize an i386 object file when we already know that the machine
// number is EM_386.

Target*
Target_selector_i386::recognize(int, int, int) const
{
  return new Target_i386();
}

Target_selector_i386 target_selector_i386;

} // End anonymous namespace.