This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use libc_ifunc_hidden_def in x86_64/gettimeofday.c
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 14 Dec 2012 09:22:54 -0800
- Subject: PATCH: Use libc_ifunc_hidden_def in x86_64/gettimeofday.c
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch uses libc_ifunc_hidden_def x86_64/gettimeofday.c. OK for
2.18?
Thanks.
H.J.
2012-12-14 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: Use
libc_ifunc_hidden_def.
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
index d52f938..9af9316 100644
--- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
@@ -36,11 +36,7 @@ gettimeofday_ifunc (void)
}
asm (".type __gettimeofday, %gnu_indirect_function");
-/* This is doing "libc_hidden_def (__gettimeofday)" but the compiler won't
- let us do it in C because it doesn't know we're defining __gettimeofday
- here in this file. */
-asm (".globl __GI___gettimeofday\n"
- "__GI___gettimeofday = __gettimeofday");
+libc_ifunc_hidden_def (__gettimeofday)
#else