diff options
author | Roland McGrath <roland@hack.frob.com> | 2012-05-24 11:37:30 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2012-05-24 13:12:34 -0700 |
commit | d6c33fda03457ca8ca87a562fa2681af16ca4ea5 (patch) | |
tree | 322ac1d3d0cb979a0a0c1398333b42e0bc34cee7 /sysdeps/unix/sysv/linux/x86_64 | |
parent | b5a2bbe6cceeaa558a5cb174417ab083b2dc549c (diff) | |
download | glibc-d6c33fda03457ca8ca87a562fa2681af16ca4ea5.tar glibc-d6c33fda03457ca8ca87a562fa2681af16ca4ea5.tar.gz glibc-d6c33fda03457ca8ca87a562fa2681af16ca4ea5.tar.bz2 glibc-d6c33fda03457ca8ca87a562fa2681af16ca4ea5.zip |
Switch gettimeofday from INTUSE to libc_hidden_proto.
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/gettimeofday.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c index e41fddb297..d52f938e71 100644 --- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2007, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -15,13 +15,14 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <dl-vdso.h> +#include <sys/time.h> +#ifdef SHARED -#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000ul +# include <dl-vdso.h> +# define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000ul -#ifdef SHARED void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday"); void * @@ -33,9 +34,16 @@ gettimeofday_ifunc (void) return (_dl_vdso_vsym ("__vdso_gettimeofday", &linux26) ?: (void *) VSYSCALL_ADDR_vgettimeofday); } -__asm (".type __gettimeofday, %gnu_indirect_function"); +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"); + #else -# include <sys/time.h> + # include <sysdep.h> # include <errno.h> @@ -44,7 +52,8 @@ __gettimeofday (struct timeval *tv, struct timezone *tz) { return INLINE_SYSCALL (gettimeofday, 2, tv, tz); } -#endif +libc_hidden_def (__gettimeofday) +#endif weak_alias (__gettimeofday, gettimeofday) -strong_alias (__gettimeofday, __gettimeofday_internal) +libc_hidden_weak (gettimeofday) |