From efe681908a85a8e302052cdf27cefa2db7727811 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Mon, 10 Jun 2024 16:45:07 +0800 Subject: [PATCH] musl: allocator: Disable ifunc on aarch64 --- .../src/partition_alloc/aarch64_support.h | 4 +++- .../src/partition_alloc/page_allocator_internals_posix.cc | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h b/src/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h index 600d4ed784..aa9eda75e2 100644 --- a/src/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h +++ b/src/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h @@ -10,7 +10,9 @@ #include "partition_alloc/build_config.h" #include "partition_alloc/buildflags.h" -#if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX) +#if defined(__MUSL__) +// Musl does not support ifunc. +#elif PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX) #define HAS_HW_CAPS #endif diff --git a/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc b/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc index 0f2f3514eb..02c3de2e17 100644 --- a/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc +++ b/src/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc @@ -37,8 +37,9 @@ uint32_t SecTaskGetCodeSignStatus(SecTaskRef task) API_AVAILABLE(macos(10.12)); #endif // PA_BUILDFLAG(IS_MAC) -#if PA_BUILDFLAG(HAS_MEMORY_TAGGING) || \ - (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)) +#if PA_BUILDFLAG(HAS_MEMORY_TAGGING) || \ + (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1) && \ + !defined(__MUSL__)) struct __ifunc_arg_t; #include "partition_alloc/aarch64_support.h"