diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:42 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:42 +0000 |
| commit | e06a19b85dfce9ea18be97247d4ca315963edc5c (patch) | |
| tree | ea315682e394f1c39a30049e4497e1a723f18e3c /ELF/Writer.cpp | |
| parent | be08ec96063be8c1a1a8621eccd05a4ebeecfb42 (diff) | |
Notes
Diffstat (limited to 'ELF/Writer.cpp')
| -rw-r--r-- | ELF/Writer.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ELF/Writer.cpp b/ELF/Writer.cpp index e8718c258c77..989a55af1675 100644 --- a/ELF/Writer.cpp +++ b/ELF/Writer.cpp @@ -858,11 +858,8 @@ template <class ELFT> void Writer<ELFT>::addReservedSymbols() { // __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. |
