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: Don't define x86-64 __strncmp_ssse3 in libc.a


Hi,

sysdeps/x86_64/multiarch/strcmp.S has

/* Define multiple versions only for the definition in libc.  Don't
   define multiple versions for strncmp in static library since we
   need strncmp before the initialization happened.  */
#if (defined SHARED || !defined USE_AS_STRNCMP) && !defined NOT_IN_libc

[hjl@gnu-tools-1 build-x86_64-linux]$ nm libc.a| grep strncmp_ss
00000000 T __strncmp_ssse3
[hjl@gnu-tools-1 build-x86_64-linux]$ 

__strncmp_ssse3 in libc.a isn't used.  I am checking in this patch as
an obvious fix.  Tested on x86-64.


H.J.
---
diff --git a/ChangeLog b/ChangeLog
index 123f339..ff8710b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/x86_64/multiarch/strncmp-ssse3.S: Empty if not in
+	libc.a.
+
 2012-09-26  Marek Polacek  <polacek@redhat.com>
 
 	[BZ #14530]
diff --git a/sysdeps/x86_64/multiarch/strncmp-ssse3.S b/sysdeps/x86_64/multiarch/strncmp-ssse3.S
index a320a3e..96380a4 100644
--- a/sysdeps/x86_64/multiarch/strncmp-ssse3.S
+++ b/sysdeps/x86_64/multiarch/strncmp-ssse3.S
@@ -1,4 +1,6 @@
-#define USE_SSSE3 1
-#define STRCMP __strncmp_ssse3
-#define USE_AS_STRNCMP
-#include "../strcmp.S"
+#ifdef SHARED
+# define USE_SSSE3 1
+# define STRCMP __strncmp_ssse3
+# define USE_AS_STRNCMP
+# include "../strcmp.S"
+#endif


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