From patchwork Tue Nov 22 17:03:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 83449 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp2256548obn; Tue, 22 Nov 2016 09:03:24 -0800 (PST) X-Received: by 10.84.206.37 with SMTP id f34mr1598457ple.127.1479834204516; Tue, 22 Nov 2016 09:03:24 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id f5si668893plm.37.2016.11.22.09.03.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 09:03:24 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-75045-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-75045-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-75045-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=EpCgO1K4+L6lYQAtDUvo72E2QQ9DX 4wZ3Pept5t6u2syky6Ehrb9pLd1FvTheNCUG/GD1tzo6CGXyGj8XXlpzyG98Vm96 +qizXgpgolLZy8iXsUgrmEW/n32iEbhgf3BG9iIMTnu3dRf3/b7T0ApsH7E0ibPc vLyzVQAxK6fbxA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; s=default; bh=HPQJ3jt4bPFMNLJ3h2sxkI6+TJc=; b=xI7 C+9m1cYHdnKadjZPqTvIk1jL+C0/YGDmTTY8tc+pSb38/udHVsR26oBjWdK4L0ZM Y7EdDVSHFu1lWohGuN8tgldkYAKndLjZER+U2XS8plixLA3uG394hqufVqt9HfME OPdSKYan3V3FVUoGOYvGWmieBieo7NA087QfD/e4= Received: (qmail 96782 invoked by alias); 22 Nov 2016 17:03:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 96765 invoked by uid 89); 22 Nov 2016 17:03:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=2323 X-HELO: mx1.redhat.com To: GNU C Library From: Florian Weimer Subject: [PATCH] powerpc: Add hidden definition for __sigsetjmp Message-ID: <64ac2ecb-04ca-cf8d-2be2-71bf25636f2f@redhat.com> Date: Tue, 22 Nov 2016 18:03:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 I'm reposting this previously submitted patch. Andreas pointed out that it is harmless (no ABI impact), and it is a prerequisite of implementing full ld.so exception handling in libc.so (where the required TLS data is directly available). The internal headers already assume that such a hidden definition exists, but there is currently no reference in glibc, so this wasn't visible. Thanks, Florian powerpc: Add hidden definition for __sigsetjmp 2016-11-14 Florian Weimer * sysdeps/powerpc/powerpc64/setjmp-common.S (__GI___sigsetjmp): Define. * sysdeps/powerpc/powerpc32/setjmp.S (__sigsetjmp): Add hidden definition. diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp.S b/sysdeps/powerpc/powerpc32/fpu/setjmp.S index 6a4016c..de6cdcf 100644 --- a/sysdeps/powerpc/powerpc32/fpu/setjmp.S +++ b/sysdeps/powerpc/powerpc32/fpu/setjmp.S @@ -32,6 +32,7 @@ versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4) # define __sigsetjmp_symbol __vmx__sigsetjmp # define __sigjmp_save_symbol __vmx__sigjmp_save # include "setjmp-common.S" +libc_hidden_ver (__vmx__sigsetjmp, __sigsetjmp) # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) # define __NO_VMX__ diff --git a/sysdeps/powerpc/powerpc32/setjmp.S b/sysdeps/powerpc/powerpc32/setjmp.S index 88f7f82..285d40c 100644 --- a/sysdeps/powerpc/powerpc32/setjmp.S +++ b/sysdeps/powerpc/powerpc32/setjmp.S @@ -31,6 +31,7 @@ versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4) # define __sigsetjmp_symbol __vmx__sigsetjmp # define __sigjmp_save_symbol __vmx__sigjmp_save # include "setjmp-common.S" +libc_hidden_ver (__vmx__sigsetjmp, __sigsetjmp) # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) # define __NO_VMX__ diff --git a/sysdeps/powerpc/powerpc64/setjmp-common.S b/sysdeps/powerpc/powerpc64/setjmp-common.S index 83361f5..b5de49e 100644 --- a/sysdeps/powerpc/powerpc64/setjmp-common.S +++ b/sysdeps/powerpc/powerpc64/setjmp-common.S @@ -232,3 +232,14 @@ L(no_vmx): blr #endif END (__sigsetjmp_symbol) + +#if defined SHARED && !IS_IN (rtld) && !defined __NO_VMX__ +/* When called from within libc we need a special version of __sigsetjmp + that saves r2 since the call won't go via a plt call stub. See + bugz #269. */ +ENTRY (__GI___sigsetjmp) + std r2,FRAME_TOC_SAVE(r1) /* Save the callers TOC in the save area. */ + CALL_MCOUNT 1 + b JUMPTARGET (GLUE(__sigsetjmp_symbol,_ent)) +END (__GI___sigsetjmp) +#endif