From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15989 invoked by alias); 24 May 2012 14:40:22 -0000 Received: (qmail 15870 invoked by uid 22791); 24 May 2012 14:40:21 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_HW X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 May 2012 14:40:08 +0000 Received: by vbbey12 with SMTP id ey12so7073955vbb.0 for ; Thu, 24 May 2012 07:40:06 -0700 (PDT) Received: by 10.52.67.199 with SMTP id p7mr15826901vdt.75.1337870406833; Thu, 24 May 2012 07:40:06 -0700 (PDT) Received: from pebble.twiddle.net ([173.160.232.49]) by mx.google.com with ESMTPS id g10sm25224615vdk.2.2012.05.24.07.40.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 May 2012 07:40:05 -0700 (PDT) Message-ID: <4FBE4843.5030107@twiddle.net> Date: Thu, 24 May 2012 14:40:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: libc-alpha@sourceware.org, libc-ports@sourceware.org CC: "Ryan S. Arnold" , David Miller , Joseph Myers Subject: Re: [ppc] Include hwcap as ifunc argument References: <4FBA744A.6000702@twiddle.net> In-Reply-To: <4FBA744A.6000702@twiddle.net> Content-Type: multipart/mixed; boundary="------------090609040003060606040704" X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00147.txt.bz2 This is a multi-part message in MIME format. --------------090609040003060606040704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 780 On 05/21/2012 09:58 AM, Richard Henderson wrote: > Aside from the x86 port, there are only two targets that have ifunc > support in glibc mainline: ppc and arm. It would be awesomely handy > if we switch these targets to mirror the sparc lead in passing along > the dl_hwcap contents as an argument to the resolver, *and* to do it > in the same release as adding getauxval. There are some clever things > we can do at static link time if we know that getauxval corresponds to > the availability of the ifunc argument. > > Dave, dunno if you wanna change the signature of the arg from int to > unsigned long for 64-bit? It just seemed prudent to do that here... > > I'll present a similar patch for arm shortly... Like so. Tested on armv7. And a ping for the ppc patch? r~ --------------090609040003060606040704 Content-Type: text/plain; charset=UTF-8; name="d-hwcap-6" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="d-hwcap-6" Content-length: 404 diff --git a/sysdeps/arm/dl-irel.h b/sysdeps/arm/dl-irel.h index 5141031..5b1964e 100644 --- a/sysdeps/arm/dl-irel.h +++ b/sysdeps/arm/dl-irel.h @@ -29,7 +29,7 @@ static inline Elf32_Addr __attribute ((always_inline)) elf_ifunc_invoke (Elf32_Addr addr) { - return ((Elf32_Addr (*) (void)) (addr)) (); + return ((Elf32_Addr (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap)); } static inline void --------------090609040003060606040704--