[PATCH 0/4] Export AT_HWCAP from libc.
David Miller
davem@davemloft.net
Fri Mar 16 23:53:00 GMT 2012
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.
More information about the Libc-alpha
mailing list