rtld: attempt to fix reloc_non_plt TLS allocation on MIPS

allocate_tls_offset returns true on success.  The same issue existed
on arm and was fixed in r345693.

PR:		236880
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2019-03-29 15:07:00 +00:00
parent dc412d2d4b
commit 650f4477a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345694

View File

@ -588,7 +588,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags,
if (def == NULL)
return -1;
if (!defobj->tls_done && allocate_tls_offset(obj))
if (!defobj->tls_done && !allocate_tls_offset(obj))
return -1;
val += (Elf_Addr)def->st_value - TLS_DTP_OFFSET;
@ -616,7 +616,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags,
if (def == NULL)
return -1;
if (!defobj->tls_done && allocate_tls_offset(obj))
if (!defobj->tls_done && !allocate_tls_offset(obj))
return -1;
val += (Elf_Addr)(def->st_value + defobj->tlsoffset