From 1c98619801a5705c688e683be3ef9d70169a0686 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:48:50 +0000 Subject: Vendor import of lld release_39 branch r276489: https://llvm.org/svn/llvm-project/lld/branches/release_39@276489 --- .../ELF/AArch64/AArch64ExecutableWriter.cpp | 52 ---------------------- 1 file changed, 52 deletions(-) delete mode 100644 lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.cpp (limited to 'lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.cpp') diff --git a/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.cpp b/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.cpp deleted file mode 100644 index 9a9ec6cba12b..000000000000 --- a/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===- lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.cpp -------------===// -// -// The LLVM Linker -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "AArch64LinkingContext.h" -#include "AArch64ExecutableWriter.h" -#include "AArch64TargetHandler.h" -#include "AArch64SectionChunks.h" - -namespace lld { -namespace elf { - -AArch64ExecutableWriter::AArch64ExecutableWriter(AArch64LinkingContext &ctx, - AArch64TargetLayout &layout) - : ExecutableWriter(ctx, layout), _targetLayout(layout) {} - -void AArch64ExecutableWriter::createImplicitFiles( - std::vector> &result) { - ExecutableWriter::createImplicitFiles(result); - auto gotFile = llvm::make_unique("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)); -} - -void AArch64ExecutableWriter::buildDynamicSymbolTable(const File &file) { - for (auto sec : this->_layout.sections()) { - if (auto section = dyn_cast>(sec)) { - for (const auto &atom : section->atoms()) { - // Add all globals GOT symbols (in both .got and .got.plt sections) - // on dynamic symbol table. - for (const auto §ion : _targetLayout.getGOTSections()) { - if (section->hasGlobalGOTEntry(atom->_atom)) - _dynamicSymbolTable->addSymbol(atom->_atom, section->ordinal(), - atom->_virtualAddr, atom); - } - } - } - } - - ExecutableWriter::buildDynamicSymbolTable(file); -} - -} // namespace elf -} // namespace lld - -- cgit v1.3