aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-09-04 10:10:31 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-10-08 13:28:21 -0300
commit02b195d30fdf4d2a396a550ea6044511f1305a9f (patch)
treee64a8cfe066c2b1188fc0158492b913284817fa9 /sysdeps/unix/sysv
parent7949f552cb6a5f5e2a20c45d178b43910682caac (diff)
downloadglibc-02b195d30fdf4d2a396a550ea6044511f1305a9f.zip
glibc-02b195d30fdf4d2a396a550ea6044511f1305a9f.tar.gz
glibc-02b195d30fdf4d2a396a550ea6044511f1305a9f.tar.bz2
linux: Use GLRO(dl_vdso_gettimeofday) on gettimeofday
The BZ#24967 fix (1bdda52fe92fd01b424c) missed the gettimeofday for architectures that define USE_IFUNC_GETTIMEOFDAY. Although it is not an issue, since there is no pointer mangling, there is also no need to call dl_vdso_vsym since the vDSO setup was already done by the loader. Checked on x86_64-linux-gnu and i686-linux-gnu.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/gettimeofday.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/gettimeofday.c b/sysdeps/unix/sysv/linux/gettimeofday.c
index 7ab147c..5ca8916 100644
--- a/sysdeps/unix/sysv/linux/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/gettimeofday.c
@@ -37,11 +37,11 @@ __gettimeofday_syscall (struct timeval *restrict tv, void *restrict tz)
}
# undef INIT_ARCH
-# define INIT_ARCH() \
- void *vdso_gettimeofday = dl_vdso_vsym (HAVE_GETTIMEOFDAY_VSYSCALL)
+# define INIT_ARCH()
libc_ifunc (__gettimeofday,
- vdso_gettimeofday ? VDSO_IFUNC_RET (vdso_gettimeofday)
- : (void *) __gettimeofday_syscall)
+ GLRO(dl_vdso_gettimeofday) != NULL
+ ? VDSO_IFUNC_RET (GLRO(dl_vdso_gettimeofday))
+ : (void *) __gettimeofday_syscall)
# else
int