[PATCH 1/1] aarch64: compile malloc ifuncs conditionally

Yury Khrustalev yury.khrustalev@arm.com
Mon Jun 29 16:37:22 GMT 2026


On AArch64, ifuncs are used for malloc functions by default.

The code for resolvers in sysdeps/aarch64/multiarch/malloc-ifuncs.c
was compiled unconditionally, so if the USE_MULTIARCH_MALLOC macro
is redefined, this may lead to build errors. This change resolves
this inconsistency.

No function change is intended.
---
 sysdeps/aarch64/multiarch/malloc-ifuncs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sysdeps/aarch64/multiarch/malloc-ifuncs.c b/sysdeps/aarch64/multiarch/malloc-ifuncs.c
index 648fb617de..b1776f9e23 100644
--- a/sysdeps/aarch64/multiarch/malloc-ifuncs.c
+++ b/sysdeps/aarch64/multiarch/malloc-ifuncs.c
@@ -16,6 +16,10 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include "malloc-ifuncs.h"
+
+#if USE_MULTIARCH_MALLOC
+
 #if IS_IN (libc)
 
 #include <init-arch.h>
@@ -75,3 +79,5 @@ weak_alias (__free_aligned_sized_redirect, free_aligned_sized)
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_26)
 compat_symbol (libc, __libc_free_redirect, cfree, GLIBC_2_0);
 #endif
+
+#endif /* USE_MULTIARCH_MALLOC */
-- 
2.47.3



More information about the Libc-alpha mailing list