]> git.ipfire.org Git - thirdparty/glibc.git/commit
aarch64: add __ifunc_hwcap function to be used in ifunc resolvers
authorYury Khrustalev <yury.khrustalev@arm.com>
Thu, 24 Apr 2025 15:58:46 +0000 (16:58 +0100)
committerYury Khrustalev <yury.khrustalev@arm.com>
Thu, 5 Jun 2025 13:38:51 +0000 (14:38 +0100)
commitfcd6a8b5c53a5fbd847aec6fa8d36a71388441c8
tree064307d94e5b9bf4f3cdcc6af9841a32c369ec11
parentea14d04e9a831874e40be39522145a45f1f4f8c7
aarch64: add __ifunc_hwcap function to be used in ifunc resolvers

Add a new helper function __ifunc_hwcap() as a portable way to
access HWCAP elements via the parameter(s) passed to an ifunc
resolver checking the _IFUNC_ARG_HWCAP bit in the first parameter
and size of the buffer in the second parameter.

Note that 0 is returned when the requested element is not available
or does not correspond to a valid AT_HWCAP{,2,...} value.

Also add relevant tests.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/aarch64/Makefile
sysdeps/aarch64/sys/ifunc.h
sysdeps/aarch64/tst-ifunc-arg-1.c
sysdeps/aarch64/tst-ifunc-arg-2.c
sysdeps/aarch64/tst-ifunc-arg-3.c [new file with mode: 0644]
sysdeps/aarch64/tst-ifunc-arg-4.c [new file with mode: 0644]