Date: Tue, 1 Jan 2019 20:12:59 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342671 - head/libexec/rtld-elf/powerpc64 Message-ID: <201901012012.x01KCxZJ037204@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Tue Jan 1 20:12:58 2019 New Revision: 342671 URL: https://svnweb.freebsd.org/changeset/base/342671 Log: rtld-elf: Fix powerpc64 TLS handling, matching powerpc's fix We need to subtract the TLS_TCB_SIZE to get to the real data pointer, since r13 points to the end of the TCB structure. Prior to this, devel/protobuf-c port broke with recent update to devel/protobuf, which exposed this issue. Submitted by: andreast Reported by: Piotr Kubaj MFC after: 1 week Modified: head/libexec/rtld-elf/powerpc64/reloc.c Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Tue Jan 1 19:56:49 2019 (r342670) +++ head/libexec/rtld-elf/powerpc64/reloc.c Tue Jan 1 20:12:58 2019 (r342671) @@ -256,7 +256,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld __unused, Obj_ *(Elf_Addr **)where = *where * sizeof(Elf_Addr) + (Elf_Addr *)(def->st_value + rela->r_addend - + defobj->tlsoffset - TLS_TP_OFFSET); + + defobj->tlsoffset - TLS_TP_OFFSET - TLS_TCB_SIZE); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901012012.x01KCxZJ037204>