[PATCH] D32053: Define __tls_get_addr as a hidden symbol even for ARM or MIPS.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 21:57:49 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL301290: Define __tls_get_addr as a hidden symbol even for ARM or MIPS. (authored by ruiu).
Changed prior to commit:
https://reviews.llvm.org/D32053?vs=95213&id=96501#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32053
Files:
lld/trunk/ELF/Writer.cpp
Index: lld/trunk/ELF/Writer.cpp
===================================================================
--- lld/trunk/ELF/Writer.cpp
+++ lld/trunk/ELF/Writer.cpp
@@ -858,11 +858,8 @@
// __tls_get_addr is defined by the dynamic linker for dynamic ELFs. For
// static linking the linker is required to optimize away any references to
// __tls_get_addr, so it's not defined anywhere. Create a hidden definition
- // to avoid the undefined symbol error. As usual special cases are ARM and
- // MIPS - the libc for these targets defines __tls_get_addr itself because
- // there are no TLS optimizations for these targets.
- if (!In<ELFT>::DynSymTab &&
- (Config->EMachine != EM_MIPS && Config->EMachine != EM_ARM))
+ // to avoid the undefined symbol error.
+ if (!In<ELFT>::DynSymTab)
Symtab<ELFT>::X->addIgnored("__tls_get_addr");
// If linker script do layout we do not need to create any standart symbols.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32053.96501.patch
Type: text/x-patch
Size: 930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170425/830cb664/attachment.bin>
More information about the llvm-commits
mailing list