svn commit: r345694 - head/libexec/rtld-elf/mips
Ed Maste
emaste at FreeBSD.org
Tue Sep 3 14:06:09 UTC 2019
Author: emaste
Date: Fri Mar 29 15:07:00 2019
New Revision: 345694
URL: https://svnweb.freebsd.org/changeset/base/345694
Log:
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
Modified:
head/libexec/rtld-elf/mips/reloc.c
Modified: head/libexec/rtld-elf/mips/reloc.c
==============================================================================
--- head/libexec/rtld-elf/mips/reloc.c Fri Mar 29 14:35:23 2019 (r345693)
+++ head/libexec/rtld-elf/mips/reloc.c Fri Mar 29 15:07:00 2019 (r345694)
@@ -588,7 +588,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int
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
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
More information about the svn-src-all
mailing list