[PATCH v3 0/1] aarch64: Add ifuncs for malloc functions

Yury Khrustalev yury.khrustalev@arm.com
Sun May 31 16:13:21 GMT 2026


See commit message for details. In a nutshell, we want to add ifuncs
for the functions related to the malloc API (on targets that support
ifuncs). This will allow to add alternative (e.g. target-specific)
implementations or wrappers for these functions.

This patch introduces ifuncs for malloc functions for aarch64 in
multiarch mode.

Changes in v3:
 - Moved all ifunc code into multiarch folder under aarch64, so this
   change is now aarch64-only not affecting other targets.
 - v2: https://inbox.sourceware.org/libc-alpha/20260420141459.531612-1-yury.khrustalev@arm.com

Changes in v2:
 - Fixed ifunc resolvers arguments: use no arguments for generic resolvers
   and use 'uint64_t arg0, uint64_t arg1[]' for aarch64 resolvers.
 - Added grep test to check that code in malloc.c doesn't use non-_core
   functions.
 - Cleaned-up makefile patch.


Yury Khrustalev (1):
  malloc: aarch64: Add ifuncs for malloc functions

 malloc/malloc-internal.h                  |   3 +
 malloc/malloc.c                           |  42 ++++++--
 sysdeps/aarch64/multiarch/Makefile        |  10 +-
 sysdeps/aarch64/multiarch/malloc-ifuncs.c | 119 ++++++++++++++++++++++
 sysdeps/aarch64/multiarch/malloc-ifuncs.h |  61 +++++++++++
 sysdeps/generic/malloc-ifuncs.h           |  37 +++++++
 6 files changed, 264 insertions(+), 8 deletions(-)
 create mode 100644 sysdeps/aarch64/multiarch/malloc-ifuncs.c
 create mode 100644 sysdeps/aarch64/multiarch/malloc-ifuncs.h
 create mode 100644 sysdeps/generic/malloc-ifuncs.h

-- 
2.47.3



More information about the Libc-alpha mailing list