public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: libc-alpha@sourceware.org, libc-ports@sourceware.org
Cc: "Ryan S. Arnold" <rsa@linux.vnet.ibm.com>,
	 David Miller <davem@davemloft.net>,
	Joseph Myers <joseph@codesourcery.com>
Subject: Re: [ppc] Include hwcap as ifunc argument
Date: Thu, 24 May 2012 14:40:00 -0000	[thread overview]
Message-ID: <4FBE4843.5030107@twiddle.net> (raw)
In-Reply-To: <4FBA744A.6000702@twiddle.net>

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

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~

[-- Attachment #2: d-hwcap-6 --]
[-- Type: text/plain, Size: 404 bytes --]

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

       reply	other threads:[~2012-05-24 14:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4FBA744A.6000702@twiddle.net>
2012-05-24 14:40 ` Richard Henderson [this message]
2012-05-24 14:45   ` Joseph S. Myers
2012-05-24 19:47   ` David Miller
2012-05-25 17:44 ` Richard Henderson
2012-06-04 21:22   ` Ryan S. Arnold
2012-06-04 22:14     ` Richard Henderson
2012-06-08 14:01       ` Andreas Krebbel
2012-06-08 14:49         ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FBE4843.5030107@twiddle.net \
    --to=rth@twiddle.net \
    --cc=davem@davemloft.net \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.org \
    --cc=rsa@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).