]> sourceware.org Git - glibc.git/commitdiff
linux: Use GLRO(dl_vdso_time) on time
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 4 Sep 2024 13:22:44 +0000 (10:22 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 8 Oct 2024 16:28:21 +0000 (13:28 -0300)
The BZ#24967 fix (1bdda52fe92fd01b424c) missed the time for
architectures that define USE_IFUNC_TIME.  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.

sysdeps/unix/sysv/linux/time.c

index f8b0cee41cb73d6657f2b5d77e67563843f6b4ef..a56ef6fa30f21b171ff629c13a3d951a1b1abd55 100644 (file)
@@ -33,11 +33,10 @@ time_syscall (time_t *t)
 }
 
 # undef INIT_ARCH
-# define INIT_ARCH() \
-  void *vdso_time = dl_vdso_vsym (HAVE_TIME_VSYSCALL);
+# define INIT_ARCH()
 libc_ifunc (time,
-           vdso_time ? VDSO_IFUNC_RET (vdso_time)
-                     : (void *) time_syscall);
+           GLRO(dl_vdso_time) != NULL ? VDSO_IFUNC_RET (GLRO(dl_vdso_time))
+                                      : (void *) time_syscall);
 
 # else
 time_t
This page took 0.037899 seconds and 5 git commands to generate.