This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 10/20] libcpu-rt-c: Don't use IFUNC memcmp in init_cpu_features


Don't use IFUNC memcmp in init_cpu_features libcpu-rt-c since IFUNC must
be set up by init_cpu_features.

	* sysdeps/x86/cpu-tunables.c (DEFAULT_MEMCMP): Don't use IFUNC
	memcmp in libcpu-rt-c.
---
 sysdeps/x86/cpu-tunables.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c
index 3d1c26577f..901a5d3934 100644
--- a/sysdeps/x86/cpu-tunables.c
+++ b/sysdeps/x86/cpu-tunables.c
@@ -32,13 +32,17 @@
 
 /* We can't use IFUNC memcmp nor strlen in init_cpu_features from libc.a
    since IFUNC must be set up by init_cpu_features.  */
-# if defined USE_MULTIARCH && !defined SHARED
+# if defined USE_MULTIARCH && (!defined SHARED || IS_IN (libcpu_rt_c))
 #  ifdef __x86_64__
 #   define DEFAULT_MEMCMP	__memcmp_sse2
 #  else
 #   define DEFAULT_MEMCMP	__memcmp_ia32
 #  endif
-extern __typeof (memcmp) DEFAULT_MEMCMP;
+extern __typeof (memcmp) DEFAULT_MEMCMP
+# if IS_IN (libcpu_rt_c)
+  __attribute__ ((visibility ("hidden")));
+# endif
+;
 # else
 #  define DEFAULT_MEMCMP	memcmp
 # endif
-- 
2.17.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]