aboutsummaryrefslogtreecommitdiff
path: root/elf/do-lookup.h
diff options
context:
space:
mode:
Diffstat (limited to 'elf/do-lookup.h')
-rw-r--r--elf/do-lookup.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/elf/do-lookup.h b/elf/do-lookup.h
index cebc2ce300..3e7290241b 100644
--- a/elf/do-lookup.h
+++ b/elf/do-lookup.h
@@ -77,10 +77,12 @@ FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
sym = &symtab[symidx];
assert (ELF_RTYPE_CLASS_PLT == 1);
- if (sym->st_value == 0 || /* No value. */
- /* ((type_class & ELF_RTYPE_CLASS_PLT)
- && (sym->st_shndx == SHN_UNDEF)) */
- (type_class & (sym->st_shndx == SHN_UNDEF)))
+ if ((sym->st_value == 0 /* No value. */
+#ifdef USE_TLS
+ && ELFW(ST_TYPE) (sym->st_info) != STT_TLS
+#endif
+ )
+ || (type_class & (sym->st_shndx == SHN_UNDEF)))
continue;
if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC