diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-08-09 16:04:37 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-08-09 16:04:37 -0700 |
commit | f85fa27058eb7d4b56b8deaf885064cf8d730f68 (patch) | |
tree | f7e63a9691ff3c88f60506816e388e17bcfbeb89 /sysdeps/unix/sysv/linux/x86_64 | |
parent | 6dcf80c78273c5e0bdcacaf64a9b34fd930b405f (diff) | |
download | glibc-f85fa27058eb7d4b56b8deaf885064cf8d730f68.tar.gz glibc-f85fa27058eb7d4b56b8deaf885064cf8d730f68.tar.xz glibc-f85fa27058eb7d4b56b8deaf885064cf8d730f68.zip |
Avoid DWARF definition DIE on ifunc symbols
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/time.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c b/sysdeps/unix/sysv/linux/x86_64/time.c index 0e05ddd523..65703cab90 100644 --- a/sysdeps/unix/sysv/linux/x86_64/time.c +++ b/sysdeps/unix/sysv/linux/x86_64/time.c @@ -16,11 +16,20 @@ <http://www.gnu.org/licenses/>. */ #ifdef SHARED +/* Redefine time so that the compiler won't complain about the type + mismatch with the IFUNC selector in strong_alias, below. */ +#undef time +#define time __redirect_time +#include <time.h> + #include <dl-vdso.h> #define VSYSCALL_ADDR_vtime 0xffffffffff600400 -void *time_ifunc (void) __asm__ ("time"); +/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle + ifunc symbol properly. */ +extern __typeof (__redirect_time) __libc_time; +void *time_ifunc (void) __asm__ ("__libc_time"); void * time_ifunc (void) @@ -30,7 +39,11 @@ time_ifunc (void) /* If the vDSO is not available we fall back on the old vsyscall. */ return _dl_vdso_vsym ("__vdso_time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime; } -__asm (".type time, %gnu_indirect_function"); +__asm (".type __libc_time, %gnu_indirect_function"); + +#undef time +strong_alias (__libc_time, time) +libc_hidden_ver (__libc_time, time) #else @@ -45,5 +58,3 @@ time (time_t *t) } #endif - -strong_alias (time, __GI_time) |