diff options
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. |