[RFC] Expanding the hwcap

Mike Frysinger vapier@gentoo.org
Wed Oct 17 06:28:00 GMT 2012


On Tuesday 16 October 2012 18:08:32 Ryan Arnold wrote:
> In GLIBC we could copy these bits up to the high 32-bits of the existing
> 64-bit hwcap (uint64) and continue to access the existing hwcap via the
> GLRO macros.  This would of course eliminate parity between the kernel
> hwcap definitions and those in GLIBC (exported via hwcap.h).

maybe i'm naive, but couldn't you have the kernel declare 
cpu_spec.cpu_user_features as 64bit and then take care of splitting up 
ELF_HWCAP into AT_HWCAP and AT_HWCAP2 automatically ?  you could have the 
binfmt loader do something like:
	NEW_AUX_ENT(AT_HWCAP, ELF_HWCAP);
	if (sizeof(*elf_info) < sizeof(ELF_HWCAP))
		NEW_AUX_ENT(AT_HWCAP2, (ELF_HWCAP) >> (sizeof(*elf_info) * 8));

then the ldso knows that if it sees AT_HWCAP2, it has to manually merge it 
into the higher bits.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20121017/a1b926cd/attachment.sig>


More information about the Libc-alpha mailing list