X86GNUInfo.h revision 37b74a387bb3993387029859c2d9d051c41c724e
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 TARGET_X86_X86GNUINFO_H_
10#define TARGET_X86_X86GNUINFO_H_
11#include "mcld/Target/GNUInfo.h"
12
13#include <llvm/Support/ELF.h>
14
15namespace mcld {
16
17class X86_32GNUInfo : public GNUInfo {
18 public:
19  explicit X86_32GNUInfo(const llvm::Triple& pTriple) : GNUInfo(pTriple) {}
20
21  uint32_t machine() const { return llvm::ELF::EM_386; }
22
23  uint64_t defaultTextSegmentAddr() const { return 0x08048000; }
24
25  /// flags - the value of ElfXX_Ehdr::e_flags
26  /// FIXME
27  uint64_t flags() const { return 0x0; }
28};
29
30class X86_64GNUInfo : public GNUInfo {
31 public:
32  explicit X86_64GNUInfo(const llvm::Triple& pTriple) : GNUInfo(pTriple) {}
33
34  uint32_t machine() const { return llvm::ELF::EM_X86_64; }
35
36  uint64_t defaultTextSegmentAddr() const { return 0x400000; }
37
38  /// flags - the value of ElfXX_Ehdr::e_flags
39  /// FIXME
40  uint64_t flags() const { return 0x0; }
41};
42
43}  // namespace mcld
44
45#endif  // TARGET_X86_X86GNUINFO_H_
46