• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
15 namespace mcld {
16 
17 class X86_32GNUInfo : public GNUInfo
18 {
19 public:
X86_32GNUInfo(const llvm::Triple & pTriple)20   X86_32GNUInfo(const llvm::Triple& pTriple) : GNUInfo(pTriple) { }
21 
machine()22   uint32_t machine() const { return llvm::ELF::EM_386; }
23 
defaultTextSegmentAddr()24   uint64_t defaultTextSegmentAddr() const { return 0x08048000; }
25 
26   /// flags - the value of ElfXX_Ehdr::e_flags
27   /// FIXME
flags()28   uint64_t flags() const { return 0x0; }
29 
30 };
31 
32 class X86_64GNUInfo : public GNUInfo
33 {
34 public:
X86_64GNUInfo(const llvm::Triple & pTriple)35   X86_64GNUInfo(const llvm::Triple& pTriple) : GNUInfo(pTriple) { }
36 
machine()37   uint32_t machine() const { return llvm::ELF::EM_X86_64; }
38 
defaultTextSegmentAddr()39   uint64_t defaultTextSegmentAddr() const { return 0x400000; }
40 
41   /// flags - the value of ElfXX_Ehdr::e_flags
42   /// FIXME
flags()43   uint64_t flags() const { return 0x0; }
44 
45 };
46 
47 } // namespace of mcld
48 
49 #endif
50 
51