svn commit: r346142 - in stable/12/libexec/rtld-elf: arm mips
Ed Maste
emaste at FreeBSD.org
Tue Sep 3 14:06:45 UTC 2019
Author: emaste
Date: Fri Apr 12 00:31:22 2019
New Revision: 346142
URL: https://svnweb.freebsd.org/changeset/base/346142
Log:
MFC r345693, 345694: rtld: attempt to fix reloc_nonplt_object TLS allocation
on arm and mips
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 <andrew at tao11.riddles.org.uk> (arm)
Sponsored by: The FreeBSD Foundation
Modified:
stable/12/libexec/rtld-elf/arm/reloc.c
stable/12/libexec/rtld-elf/mips/reloc.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/libexec/rtld-elf/arm/reloc.c
==============================================================================
--- stable/12/libexec/rtld-elf/arm/reloc.c Fri Apr 12 00:15:36 2019 (r346141)
+++ stable/12/libexec/rtld-elf/arm/reloc.c Fri Apr 12 00:31:22 2019 (r346142)
@@ -319,7 +319,7 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel
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;
Modified: stable/12/libexec/rtld-elf/mips/reloc.c
==============================================================================
--- stable/12/libexec/rtld-elf/mips/reloc.c Fri Apr 12 00:15:36 2019 (r346141)
+++ stable/12/libexec/rtld-elf/mips/reloc.c Fri Apr 12 00:31:22 2019 (r346142)
@@ -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-stable
mailing list