diff options
Diffstat (limited to 'lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.cpp')
| -rw-r--r-- | lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.cpp b/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.cpp deleted file mode 100644 index 083b492c1607..000000000000 --- a/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===- lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.cpp --------------===// -// -// The LLVM Linker -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "Atoms.h" -#include "AArch64DynamicLibraryWriter.h" -#include "AArch64ExecutableWriter.h" -#include "AArch64LinkingContext.h" -#include "AArch64TargetHandler.h" -#include "AArch64SectionChunks.h" - -using namespace lld; -using namespace elf; - -AArch64TargetLayout::AArch64TargetLayout(ELFLinkingContext &ctx) : - TargetLayout(ctx) {} - -AtomSection<ELF64LE> *AArch64TargetLayout::createSection( - StringRef name, int32_t type, DefinedAtom::ContentPermissions permissions, - TargetLayout<ELF64LE>::SectionOrder order) { - if (type == DefinedAtom::typeGOT && (name == ".got" || name == ".got.plt")) { - auto section = new (this->_allocator) AArch64GOTSection(this->_ctx, name, - order); - _gotSections.push_back(section); - return section; - } - return TargetLayout<ELF64LE>::createSection(name, type, permissions, order); -} - - -AArch64TargetHandler::AArch64TargetHandler(AArch64LinkingContext &ctx) - : _ctx(ctx), _targetLayout(new AArch64TargetLayout(ctx)), - _relocationHandler(new AArch64TargetRelocationHandler(*_targetLayout)) {} - -std::unique_ptr<Writer> AArch64TargetHandler::getWriter() { - switch (this->_ctx.getOutputELFType()) { - case llvm::ELF::ET_EXEC: - return llvm::make_unique<AArch64ExecutableWriter>(_ctx, *_targetLayout); - case llvm::ELF::ET_DYN: - return llvm::make_unique<AArch64DynamicLibraryWriter>(_ctx, *_targetLayout); - case llvm::ELF::ET_REL: - llvm_unreachable("TODO: support -r mode"); - default: - llvm_unreachable("unsupported output type"); - } -} |
