[lld] r241371 - [ELF/AArch64] Set correct loader name in linking context
Adhemerval Zanella
adhemerval.zanella at linaro.org
Fri Jul 3 14:24:36 PDT 2015
Author: azanella
Date: Fri Jul 3 16:24:36 2015
New Revision: 241371
URL: http://llvm.org/viewvc/llvm-project?rev=241371&view=rev
Log:
[ELF/AArch64] Set correct loader name in linking context
This patch reimplements ELFLinkingContext::getDefaultInterpreter for aarch64
with correct loader name. It is required to exclude the loader from DT_NEEDED
in shared library creation.
Modified:
lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp?rev=241371&r1=241370&r2=241371&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp Fri Jul 3 16:24:36 2015
@@ -252,10 +252,10 @@ protected:
return got->second;
}
- /// \brief Create a GOT TPREL entry and change the relocation to a PC32 to
- /// the GOT.
+ /// \brief Create a GOT TPREL entry to local or external TLS variable.
std::error_code handleGOTTPREL(const Reference &ref) {
- if (isa<DefinedAtom>(ref.target()))
+ if (isa<DefinedAtom>(ref.target()) ||
+ isa<SharedLibraryAtom>(ref.target()))
const_cast<Reference &>(ref).setTarget(getGOTTPREL(ref.target()));
return std::error_code();
}
More information about the llvm-commits
mailing list