//===- lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.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_AARCH64_AARCH64_TARGET_HANDLER_H #define LLD_READER_WRITER_ELF_AARCH64_AARCH64_TARGET_HANDLER_H #include "AArch64ELFFile.h" #include "AArch64ELFReader.h" #include "AArch64RelocationHandler.h" #include "DefaultTargetHandler.h" #include "TargetLayout.h" #include "lld/Core/Simple.h" namespace lld { namespace elf { class AArch64LinkingContext; template class AArch64TargetLayout : public TargetLayout { public: AArch64TargetLayout(AArch64LinkingContext &context) : TargetLayout(context) {} }; class AArch64TargetHandler final : public DefaultTargetHandler { public: AArch64TargetHandler(AArch64LinkingContext &context); AArch64TargetLayout &getTargetLayout() override { return *(_AArch64TargetLayout.get()); } void registerRelocationNames(Registry ®istry) override; const AArch64TargetRelocationHandler &getRelocationHandler() const override { return *(_AArch64RelocationHandler.get()); } std::unique_ptr getObjReader() override { return std::unique_ptr(new AArch64ELFObjectReader(_context)); } std::unique_ptr getDSOReader() override { return std::unique_ptr(new AArch64ELFDSOReader(_context)); } std::unique_ptr getWriter() override; private: static const Registry::KindStrings kindStrings[]; AArch64LinkingContext &_context; std::unique_ptr> _AArch64TargetLayout; std::unique_ptr _AArch64RelocationHandler; }; } // end namespace elf } // end namespace lld #endif