[PATCH v7 0/2] Update ifunc resolver interface
Yury Khrustalev
yury.khrustalev@arm.com
Thu Jun 5 12:20:28 GMT 2025
Support extending ifunc resolver interface with extra HWCAP fields
and add hwcap3 and hwcap4.
Corresponding ABI spec update (merged):
https://github.com/ARM-software/abi-aa/pull/320
This patch adds helper function that allows accessing HWCAP elements
through the parameters passed to an ifunc resolver in a portable way.
Regression tested on AArch64 and no regressions have been found.
OK for trunk?
base commit: 25f1d94576
Changes in v7:
- Returned enum for the 1st arg of the helper function.
- Made size macros that help check size of the __ifunc_arg_t
struct private.
- Rebased on master.
Link to v6:
https://patchwork.sourceware.org/project/glibc/list/?series=47315
Changes in v6:
- Updated commit message for the second patch.
- Added test of an actual ifunc resolver that uses helper function.
Link to v5:
https://patchwork.sourceware.org/project/glibc/list/?series=46717
Changes in v5:
- Fixed bug in the helper function.
- Added tests for the helper function.
- Dropped commit that would incorrectly initialise arg for
resolver functions.
- Dropped enum for HWCAP elements IDs.
Link to v4:
https://inbox.sourceware.org/libc-alpha/20250425113522.3310684-1-yury.khrustalev@arm.com/
Changes in v4:
- Revert to using fields in the __ifunc_arg_t struct.
- Update prototype of the ifunc resolver to use pointer to uint64_t
rather than pointer to the __ifunc_arg_t struct. Note that this
prototype is backward-compatible with the previous version.
- Add helper function to access HWCAP elements in a portable way.
Link to v3:
https://inbox.sourceware.org/libc-alpha/20250422124322.3056938-1-yury.khrustalev@arm.com/
Changes in v3:
- Instead of adding new fields to __ifunc_arg_t introduce a union
to allow further seamless extension and at the same time letting
existing code compile without change.
Link to v2:
https://inbox.sourceware.org/libc-alpha/20250404141511.1767584-1-yury.khrustalev@arm.com/
Changes in v2:
- Expanded comment in <sys/ifunc.h> to explain how to use the _size
field to check the version of the contents of the __ifunc_arg_t
struct.
Link to v1:
https://inbox.sourceware.org/libc-alpha/20250401141851.129625-1-yury.khrustalev@arm.com/
---
Yury Khrustalev (2):
aarch64: add support for hwcap3,4
aarch64: add __ifunc_hwcap function to be used in ifunc resolvers
sysdeps/aarch64/Makefile | 7 ++-
sysdeps/aarch64/dl-irel.h | 21 ++++++-
sysdeps/aarch64/sys/ifunc.h | 65 +++++++++++++++++++--
sysdeps/aarch64/tst-ifunc-arg-1.c | 15 +++++
sysdeps/aarch64/tst-ifunc-arg-2.c | 14 +++++
sysdeps/aarch64/tst-ifunc-arg-3.c | 97 +++++++++++++++++++++++++++++++
sysdeps/aarch64/tst-ifunc-arg-4.c | 67 +++++++++++++++++++++
7 files changed, 277 insertions(+), 9 deletions(-)
create mode 100644 sysdeps/aarch64/tst-ifunc-arg-3.c
create mode 100644 sysdeps/aarch64/tst-ifunc-arg-4.c
--
2.39.5
More information about the Libc-alpha
mailing list