X86GNUInfo.h revision 6f75755c9204b1d8817ae5a65a2f7e5af0ec3f70
1//===- X86GNUInfo.h -------------------------------------------------------===//
2//
3//                     The MCLinker Project
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9#ifndef MCLD_TARGET_X86_GNU_INFO_H
10#define MCLD_TARGET_X86_GNU_INFO_H
11#include <mcld/Target/GNUInfo.h>
12
13#include <llvm/Support/ELF.h>
14
15namespace mcld {
16
17class X86_32GNUInfo : public GNUInfo
18{
19public:
20  X86_32GNUInfo(const llvm::Triple& pTriple) : GNUInfo(pTriple) { }
21
22  uint32_t machine() const { return llvm::ELF::EM_386; }
23
24  uint64_t defaultTextSegmentAddr() const { return 0x08048000; }
25
26  /// flags - the value of ElfXX_Ehdr::e_flags
27  /// FIXME
28  uint64_t flags() const { return 0x0; }
29
30};
31
32class X86_64GNUInfo : public GNUInfo
33{
34public:
35  X86_64GNUInfo(const llvm::Triple& pTriple) : GNUInfo(pTriple) { }
36
37  uint32_t machine() const { return llvm::ELF::EM_X86_64; }
38
39  uint64_t defaultTextSegmentAddr() const { return 0x400000; }
40
41  /// flags - the value of ElfXX_Ehdr::e_flags
42  /// FIXME
43  uint64_t flags() const { return 0x0; }
44
45};
46
47} // namespace of mcld
48
49#endif
50
51