Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jan 2019 03:58:22 +0000 (UTC)
From:      Justin Hibbits <jhibbits@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: r343208 - stable/12/libexec/rtld-elf/powerpc64
Message-ID:  <201901200358.x0K3wMe3000798@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sun Jan 20 03:58:21 2019
New Revision: 343208
URL: https://svnweb.freebsd.org/changeset/base/343208

Log:
  MFC r342671:
  
  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

Modified:
  stable/12/libexec/rtld-elf/powerpc64/reloc.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/rtld-elf/powerpc64/reloc.c
==============================================================================
--- stable/12/libexec/rtld-elf/powerpc64/reloc.c	Sun Jan 20 03:53:42 2019	(r343207)
+++ stable/12/libexec/rtld-elf/powerpc64/reloc.c	Sun Jan 20 03:58:21 2019	(r343208)
@@ -255,7 +255,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, Obj_Entry *ob
 
 		*(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?201901200358.x0K3wMe3000798>