Files
clang-p2996/lld/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.h
Rui Ueyama cfeb2512fd ELF: Remove ELFT template argument when referring the base class.
We don't need to repeat the template argument. They are not
ambiguous. MIPS is parameterized for ELFT, so we can't do this
for MIPS, though.

llvm-svn: 234913
2015-04-14 17:32:13 +00:00

46 lines
1.5 KiB
C++

//===- lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.h -------------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef AARCH64_EXECUTABLE_WRITER_H
#define AARCH64_EXECUTABLE_WRITER_H
#include "AArch64LinkingContext.h"
#include "ExecutableWriter.h"
namespace lld {
namespace elf {
class AArch64ExecutableWriter : public ExecutableWriter<ELF64LE> {
public:
AArch64ExecutableWriter(AArch64LinkingContext &ctx,
TargetLayout<ELF64LE> &layout);
protected:
// Add any runtime files and their atoms to the output
void createImplicitFiles(std::vector<std::unique_ptr<File>> &) override;
};
AArch64ExecutableWriter::AArch64ExecutableWriter(AArch64LinkingContext &ctx,
TargetLayout<ELF64LE> &layout)
: ExecutableWriter(ctx, layout) {}
void AArch64ExecutableWriter::createImplicitFiles(
std::vector<std::unique_ptr<File>> &result) {
ExecutableWriter::createImplicitFiles(result);
auto gotFile = llvm::make_unique<SimpleFile>("GOTFile");
gotFile->addAtom(*new (gotFile->allocator()) GlobalOffsetTableAtom(*gotFile));
if (this->_ctx.isDynamic())
gotFile->addAtom(*new (gotFile->allocator()) DynamicAtom(*gotFile));
result.push_back(std::move(gotFile));
}
} // namespace elf
} // namespace lld
#endif