about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStan Shebs <stanshebs@google.com>2018-03-13 11:37:02 -0700
committerStan Shebs <stanshebs@google.com>2019-04-30 18:24:46 -0700
commit2431995fd0bd2764562a89b1d08bbaaee85e6748 (patch)
treed3b42b444d2e8a8181a6f15cbfaff880f22b9ee6
parentd3f21e261557f336053fd52cc468a8957cb1db73 (diff)
downloadglibc-google/grte/v6-2.29/master.tar.gz
glibc-google/grte/v6-2.29/master.tar.xz
glibc-google/grte/v6-2.29/master.zip
As with gettimeofday, avoid vdso for clang-compiled time() google/grte/v6-2.29/master
-rw-r--r--sysdeps/unix/sysv/linux/x86/time.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/x86/time.c b/sysdeps/unix/sysv/linux/x86/time.c
index 3d72488500..9051ac1be7 100644
--- a/sysdeps/unix/sysv/linux/x86/time.c
+++ b/sysdeps/unix/sysv/linux/x86/time.c
@@ -18,7 +18,8 @@
 
 #include <time.h>
 
-#ifdef SHARED
+/* Clang ifunc support works, but differently enough that this code breaks.  */
+#if defined(SHARED) && !defined(__clang__)
 
 #include <dl-vdso.h>
 #include <errno.h>
@@ -57,3 +58,5 @@ time (time_t *t)
 }
 
 #endif
+
+libc_hidden_weak (time)