From patchwork Wed Mar 12 14:05:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 52 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (caibbdcaabja.dreamhost.com [208.113.200.190]) by wilcox.dreamhost.com (Postfix) with ESMTP id C58173600A7 for ; Wed, 12 Mar 2014 07:06:05 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14307373) id 85A7761C74845; Wed, 12 Mar 2014 07:06:05 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 5987461C748AB for ; Wed, 12 Mar 2014 07:06:05 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=R1v3EeXFoJ/w0jRK2oKbXLskxW1ook5pU9cNlKenjmT oPTHZTEL3Iqf6/g+pFRYMZIPlXFIOOb+aa2BWg3C5nDIFwmndS14gxmAvmWZCJ/7 cU7ruItF7P9FPW6fAKhJHoyQPPsyaAa215lECVoNtakbTK1DCGSDwqQ/oFVSpW+o = 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=xn2oyVxYZ0UPunqMh65SwKR6W2I=; b=OQ3GntaWoqnS1g7Ed 4lqs/Sc4CGvT9PNah2aNS6P8AOG/SBU+OATDMVtoyToNU08p2y8dWCXTDcDfDrrw yA1Q8lMB+HI2TE8LCdjYzVxXLneibcOFKu5cUg7Lq5t4lVoCA5Lr2Ph5l+wZQhNk MW6RVd5rniIhRI8MuCEWq7Wd6E= Received: (qmail 19632 invoked by alias); 12 Mar 2014 14:06:02 -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 19609 invoked by uid 89); 12 Mar 2014 14:06:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e24smtp05.br.ibm.com Message-ID: <532069BF.70806@linux.vnet.ibm.com> Date: Wed, 12 Mar 2014 11:05:51 -0300 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: libc-alpha@sourceware.org Subject: Re: [PATCH] PowerPC: Fix bzero definition for static libc for PPC32 References: <531F0B9B.3050307@linux.vnet.ibm.com> In-Reply-To: <531F0B9B.3050307@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14031214-1798-0000-0000-000001FE6D80 X-DH-Original-To: glibc@patchwork.siddhesh.in Pushed upstream as dd3946c615184e1957a0cb09352cac72be5d6d5b with a modification: On 11-03-2014 10:11, Adhemerval Zanella wrote: > This patch fixes an issue for powerpc32 static build where __bzero > is not defined. This patch adds an IFUNC implementation for the symbol > in static build and correct a wrong calling for a non-existing > __memset_ppc in default __bzero_ppc. > > Fixes BZ#16689 and this patch is against the previous to fix bzero for PPC64 > https://sourceware.org/ml/libc-alpha/2014-03/msg00211.html. If no one opposes > I will push it tomorrow. > > Tested on powerpc32-fpu build with --with-cpu=power4 and --with-cpu=power7. > > -- > > 2014-03-11 Adhemerval Zanella > > [BZ #16689] > * sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S > (__bzero_ppc): Call memset@local instead of __memset_ppc@local. > Define it for static builds as well. > * sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c: Build IFUNC > selector for static builds. > > --- > > diff --git a/NEWS b/NEWS > index df126f3..897475e 100644 > --- a/NEWS > +++ b/NEWS > @@ -10,7 +10,7 @@ Version 2.20 > * The following bugs are resolved with this release: > > 15347, 15804, 15894, 16447, 16532, 16545, 16574, 16600, 16609, 16610, > - 16611, 16613, 16623, 16632, 16639, 16670, 16674, 16683. > + 16611, 16613, 16623, 16632, 16639, 16670, 16674, 16683, 16689. > > * The am33 port, which had not worked for several years, has been removed > from ports. > diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S > index 7a7cca9..71fbead 100644 > --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S > +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S > @@ -22,5 +22,5 @@ > ENTRY (__bzero_ppc) > mr r5,r4 > li r4,0 > - b __memset_ppc@local > + b memset@local > END (__bzero_ppc) > diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c > index 2a6298a..baaa6b4 100644 > --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c > +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c > @@ -17,7 +17,7 @@ > . */ > > /* Define multiple versions only for definition in libc. */ > -#if defined SHARED && !defined NOT_IN_libc > +#ifndef NOT_IN_libc > # include > # include > # include "init-arch.h" > diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S index 7a7cca9..80a2dc5 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S @@ -19,8 +19,17 @@ #include +/* memset ifunc selector is not built for static and memset@local + for shared builds makes the linker point the call to the ifunc + selector. */ +#ifdef SHARED +# define MEMSET __memset_ppc +#else +# define MEMSET memset +#endif + ENTRY (__bzero_ppc) mr r5,r4 li r4,0 - b __memset_ppc@local + b MEMSET@local END (__bzero_ppc)