From dc412d2d4b1840c693f66cb20ad4a962c5c4b3a5 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 29 Mar 2019 14:35:23 +0000 Subject: [PATCH] rtld: attempt to fix reloc_nonplt_object TLS allocation allocate_tls_offset returns true on success. This still needs more testing and review, but this change is consistent with other archs. PR: 236880 Reported by: Andrew Gierth MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- libexec/rtld-elf/arm/reloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index c175e6d5d696..09213413f66d 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -319,7 +319,7 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, if (def == NULL) return -1; - if (!defobj->tls_done && allocate_tls_offset(obj)) + if (!defobj->tls_done && !allocate_tls_offset(obj)) return -1; tmp = (Elf_Addr)def->st_value + defobj->tlsoffset;