This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/4] Export AT_HWCAP from libc.


On 03/17/2012 05:29 PM, Ryan S. Arnold wrote:
> On Fri, Mar 16, 2012 at 9:50 PM, Roland McGrath <roland@hack.frob.com> wrote:
>>> Anyways, the closest thing Solaris has to what you mention is a
>>> "long __getauxval(int type)" interface.
>>
>> If that's a general-purpose auxv-scanning interface, then that sounds like
>> it might be the really useful thing to export instead.  We could still have
>> it special-case AT_HWCAP (and perhaps a few others) to report the cached
>> values we already have internally rather than actually scan.
> 
> IBM proposed exporting a general interface for the auxv long ago and
> was told to make a library.. so we did.
> 
> svn co https://powertechprev.svn.sourceforge.net/svnroot/powertechprev/libauxv
> libauxv
> 
> Information on it's use can be found here:
> 
> https://www.ibm.com/developerworks/wikis/display/LinuxP/Optimized+Libraries#OptimizedLibraries-Libauxv
> 
> This library allows the auxv to be prefetched prior to first scan.
> 
> There's nothing terribly Power specific about the library other than
> the fact that the hwcap bits haven't been added for any arches other
> than Power.  I can/will accept patches for other arches.

Hi Ryan,

from the link it looks like Power needs libauxv especially for giving the ifunc resolvers
access to auxv bits. Would it make sense for Power to pass these values (hwcap and or
platform) as parameter to each resolver function like David implemented it for sparc?

sysdeps/sparc/sparc64/dl-irel.h:

static inline Elf64_Addr
__attribute ((always_inline))
elf_ifunc_invoke (Elf64_Addr addr)
{
  return ((Elf64_Addr (*) (int)) (addr)) (GLRO(dl_hwcap));
}

Bye,

-Andreas-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]