From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 77C803858CDA; Tue, 10 Jan 2023 16:32:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77C803858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673368371; bh=FDIf5OVxrPqg88+//m9U8xsUfQwXlepio99CM0Ls01Q=; h=From:To:Subject:Date:From; b=n7/3WMcmT8ta/Cron5yg+2cgcupwsU3K4Aze3rf4ecGLBAnKvT9h8HVxJLY7KwSGe ub0gwKmDZwWDnCSlB8PLLLjOVGfvZ708XQdS/EfinoEq6IbEs/cr9Ik3BXMR/u+BlC LNwrorLkbLm+0Bi/EDMdz0WWQBJiqrFnR5maGWA0= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/release/2.35/master] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776) X-Act-Checkin: glibc X-Git-Author: Alan Modra X-Git-Refname: refs/heads/release/2.35/master X-Git-Oldrev: 293211b6fddf60fc407d21fcba0326dd2148f76b X-Git-Newrev: d9923235f012cdaeb3dff097e11660b7f5e5b00a Message-Id: <20230110163251.77C803858CDA@sourceware.org> Date: Tue, 10 Jan 2023 16:32:51 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d9923235f012cdaeb3dff097e11660b7f5e5b00a commit d9923235f012cdaeb3dff097e11660b7f5e5b00a Author: Alan Modra Date: Sat Nov 12 11:20:31 2022 +1030 elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776) Supports pcrel addressing of TLS GOT entry. Also tweak the non-pcrel asm constraint to better reflect how the reg is used. (cherry picked from commit 94628de77888c3292fc103840731ff85f283368e) Diff: --- NEWS | 1 + sysdeps/powerpc/mod-tlsopt-powerpc.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 986578ab04..539ff38bb0 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,7 @@ The following bugs are resolved with this release: platforms [29730] broken y2038 support in fstatat on MIPS N64 [29771] Restore IPC_64 support in sysvipc *ctl functions + [29776] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 Version 2.35 diff --git a/sysdeps/powerpc/mod-tlsopt-powerpc.c b/sysdeps/powerpc/mod-tlsopt-powerpc.c index 2a82e53baf..d941024963 100644 --- a/sysdeps/powerpc/mod-tlsopt-powerpc.c +++ b/sysdeps/powerpc/mod-tlsopt-powerpc.c @@ -22,7 +22,11 @@ tls_get_addr_opt_test (void) tls_index *tls_arg; #ifdef __powerpc64__ register unsigned long thread_pointer __asm__ ("r13"); - asm ("addi %0,2,foo@got@tlsgd" : "=r" (tls_arg)); +# ifdef __PCREL__ + asm ("paddi %0,0,foo@got@tlsgd@pcrel,1" : "=b" (tls_arg)); +# else + asm ("addi %0,2,foo@got@tlsgd" : "=b" (tls_arg)); +# endif #else register unsigned long thread_pointer __asm__ ("r2"); asm ("bcl 20,31,1f\n1:\t"