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.


From: Roland McGrath <roland@hack.frob.com>
Date: Fri, 16 Mar 2012 16:40:06 -0700 (PDT)

> I think AT_HWCAP may have originated in Solaris.
> Does it have any public interface for getting the bits?

Very unlikely, Sun has always taken a completely different approach to
hwcap and related things than we have.

Instead of using cpuid checks and things like IFUNC at run-time, they
build completely seperate shared objects for each hwcap they want to
optimize for.

They also embed the hwcaps used into the ELF object and the dynamic
linker will refuse to load a shared object that uses hwcaps listed
which the current cpu doesn't support.

It basically makes something like IFUNC basically impossible to ever
add on Solaris.

Anyways, the closest thing Solaris has to what you mention is a
"long __getauxval(int type)" interface.


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