Date: Fri, 12 Apr 2019 00:31:23 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346142 - in stable/12/libexec/rtld-elf: arm mips Message-ID: <201904120031.x3C0VNUc034303@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904120031.x3C0VNUc034303>