linux: Use GLRO(dl_vdso_time) on time
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
Commit Message
The BZ#24967 fix (1bdda52fe92fd01b424c) missed the time for
architectures that define 1bdda52fe92fd01b424c. 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 | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Comments
* Adhemerval Zanella:
> The BZ#24967 fix (1bdda52fe92fd01b424c) missed the time for
> architectures that define 1bdda52fe92fd01b424c.
Second 1bdda52fe92fd01b424c seems to be a cut-and-paste error.
Thanks,
Florian
On 04/09/24 15:16, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> The BZ#24967 fix (1bdda52fe92fd01b424c) missed the time for
>> architectures that define 1bdda52fe92fd01b424c.
>
> Second 1bdda52fe92fd01b424c seems to be a cut-and-paste error.
Indeed, it should be USE_IFUNC_TIME.
@@ -32,12 +32,9 @@ time_syscall (time_t *t)
return INLINE_SYSCALL_CALL (time, t);
}
-# undef INIT_ARCH
-# define INIT_ARCH() \
- void *vdso_time = dl_vdso_vsym (HAVE_TIME_VSYSCALL);
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