[PATCH 4/6] aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASK

Szabolcs Nagy szabolcs.nagy@arm.com
Wed Jun 7 15:00:00 GMT 2017


On 01/06/17 21:12, Siddhesh Poyarekar wrote:
> Now that LD_HWCAP_MASK (or glibc.tune.hwcap_mask) is read early enough
> to influence cpu feature check in aarch64, use it to influence
> multiarch selection.  Setting LD_HWCAP_MASK such that it clears
> HWCAP_CPUID will now disable multiarch for the binary.
> 
> HWCAP_CPUID is also now set in HWCAP_IMPORTANT so that it is set by
> default.  With this patch, this feature is only usable with
> dyanmically linked binaries because LD_HWCAP_MASK is not read for
> static binaries.  A future patch fixes that.
> 
> 	* sysdeps/unix/sysv/linux/aarch64/cpu-features.c
> 	(init_cpu_features): Use glibc.tune.hwcap_mask.
> 	* sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h: New file.
> ---
>  sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 10 +++---
>  sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h  | 44 ++++++++++++++++++++++++++
>  2 files changed, 50 insertions(+), 4 deletions(-)
>  create mode 100644 sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h
> 

OK if the new HWCAP_IMPORTANT does not cause
additional open/stat/.. syscalls (please verify
that the lib search path is not increased by
running something like
strace -E LD_PRELOAD=foobar.so /bin/true
and counting the failed syscalls)

(if the search path is increased then i'd like
to know what is the purpose of that feature)



More information about the Libc-alpha mailing list