[PATCH] D10930: [ELF/AArch64] Add support for external TLS variables
Adhemerval Zanella
adhemerval.zanella at linaro.org
Fri Jul 3 08:11:40 PDT 2015
zatrazz created this revision.
zatrazz added reviewers: ruiu, shankar.easwaran.
zatrazz added subscribers: llvm-commits, lld.
zatrazz added a project: lld.
Herald added subscribers: rengolin, aemerson.
This patch add support to shared library TLS variable in AArch64RelocationPass
handleGOTTPREL creation and also reword the method comment.
http://reviews.llvm.org/D10930
Files:
lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp
Index: lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp
===================================================================
--- lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp
+++ lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp
@@ -252,10 +252,10 @@
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();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10930.29023.patch
Type: text/x-patch
Size: 769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150703/ad607228/attachment.bin>
More information about the llvm-commits
mailing list