1 //===- lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h --------------===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef X86_64_RELOCATION_HANDLER_H
11 #define X86_64_RELOCATION_HANDLER_H
13 #include "X86_64TargetHandler.h"
17 typedef llvm::object::ELFType<llvm::support::little, 2, true> X86_64ELFType;
19 class X86_64TargetLayout;
21 class X86_64TargetRelocationHandler final : public TargetRelocationHandler {
23 X86_64TargetRelocationHandler(X86_64TargetLayout &layout)
24 : _tlsSize(0), _x86_64Layout(layout) {}
26 std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
27 const lld::AtomLayout &,
28 const Reference &) const override;
31 // Cached size of the TLS segment.
32 mutable uint64_t _tlsSize;
33 X86_64TargetLayout &_x86_64Layout;
36 } // end namespace elf
37 } // end namespace lld
39 #endif // X86_64_RELOCATION_HANDLER_H