summaryrefslogtreecommitdiff
path: root/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:48:50 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:48:50 +0000
commit1c98619801a5705c688e683be3ef9d70169a0686 (patch)
tree8422105cd1a94c368315f2db16b9ac746cf7c000 /lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h
parentf4f3ce4613680903220815690ad79fc7ba0a2e26 (diff)
Notes
Diffstat (limited to 'lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h')
-rw-r--r--lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h b/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h
deleted file mode 100644
index 974dab63a126..000000000000
--- a/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h
+++ /dev/null
@@ -1,68 +0,0 @@
-//===--------- lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.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_ARM_ARM_EXECUTABLE_WRITER_H
-#define LLD_READER_WRITER_ELF_ARM_ARM_EXECUTABLE_WRITER_H
-
-#include "ExecutableWriter.h"
-#include "ARMELFWriters.h"
-#include "ARMLinkingContext.h"
-#include "ARMTargetHandler.h"
-
-namespace lld {
-namespace elf {
-
-class ARMExecutableWriter : public ARMELFWriter<ExecutableWriter<ELF32LE>> {
-public:
- ARMExecutableWriter(ARMLinkingContext &ctx, ARMTargetLayout &layout);
-
-protected:
- // Add any runtime files and their atoms to the output
- void createImplicitFiles(std::vector<std::unique_ptr<File>> &) override;
-
- void processUndefinedSymbol(StringRef symName,
- RuntimeFile<ELF32LE> &file) const override;
-
-private:
- ARMLinkingContext &_ctx;
-};
-
-ARMExecutableWriter::ARMExecutableWriter(ARMLinkingContext &ctx,
- ARMTargetLayout &layout)
- : ARMELFWriter(ctx, layout), _ctx(ctx) {}
-
-void ARMExecutableWriter::createImplicitFiles(
- std::vector<std::unique_ptr<File>> &result) {
- ExecutableWriter::createImplicitFiles(result);
- // Add default atoms for ARM.
- if (_ctx.isDynamic()) {
- auto file = llvm::make_unique<RuntimeFile<ELF32LE>>(_ctx, "ARM exec file");
- file->addAbsoluteAtom(gotSymbol);
- file->addAbsoluteAtom(dynamicSymbol);
- result.push_back(std::move(file));
- }
-}
-
-void ARMExecutableWriter::processUndefinedSymbol(
- StringRef symName, RuntimeFile<ELF32LE> &file) const {
- ARMELFWriter<ExecutableWriter<ELF32LE>>::processUndefinedSymbol(symName,
- file);
- if (symName == gotSymbol) {
- file.addAbsoluteAtom(gotSymbol);
- } else if (symName.startswith("__exidx")) {
- file.addAbsoluteAtom("__exidx_start");
- file.addAbsoluteAtom("__exidx_end");
- } else if (symName == "__ehdr_start") {
- file.addAbsoluteAtom("__ehdr_start");
- }
-}
-
-} // namespace elf
-} // namespace lld
-
-#endif // LLD_READER_WRITER_ELF_ARM_ARM_EXECUTABLE_WRITER_H