summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/X86/X86TargetInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/X86/X86TargetInfo.h')
-rw-r--r--lld/lib/ReaderWriter/ELF/X86/X86TargetInfo.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/ELF/X86/X86TargetInfo.h b/lld/lib/ReaderWriter/ELF/X86/X86TargetInfo.h
new file mode 100644
index 00000000000..7036daaecb8
--- /dev/null
+++ b/lld/lib/ReaderWriter/ELF/X86/X86TargetInfo.h
@@ -0,0 +1,35 @@
+//===- lib/ReaderWriter/ELF/X86/X86TargetInfo.h ---------------------------===//
+//
+// The LLVM Linker
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_READER_WRITER_ELF_X86_TARGETINFO_H
+#define LLD_READER_WRITER_ELF_X86_TARGETINFO_H
+
+#include "DefaultTargetHandler.h"
+
+#include "lld/Core/LinkerOptions.h"
+#include "lld/ReaderWriter/ELFTargetInfo.h"
+
+#include "llvm/Object/ELF.h"
+#include "llvm/Support/ELF.h"
+
+namespace lld {
+namespace elf {
+class X86TargetInfo LLVM_FINAL : public ELFTargetInfo {
+public:
+ X86TargetInfo(const LinkerOptions &lo) : ELFTargetInfo(lo) {
+ _targetHandler = std::unique_ptr<TargetHandlerBase>(
+ new DefaultTargetHandler<llvm::object::ELFType<llvm::support::little,
+ 4, false> >(*this));
+ }
+
+ virtual uint64_t getPageSize() const { return 0x1000; }
+};
+} // end namespace elf
+} // end namespace lld
+#endif
OpenPOWER on IntegriCloud