[PATCH v2] ARM: VDSO support

Joseph Myers joseph@codesourcery.com
Mon Jun 1 20:16:00 GMT 2015


On Fri, 29 May 2015, Nathan Lynch wrote:

> diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
> index a251b0fd7d87..7bc5936372bb 100644
> --- a/sysdeps/unix/sysv/linux/arm/Versions
> +++ b/sysdeps/unix/sysv/linux/arm/Versions
> @@ -10,5 +10,7 @@ libc {
>    GLIBC_PRIVATE {
>      # A copy of sigaction lives in libpthread, and needs these.
>      __default_sa_restorer; __default_rt_sa_restorer;
> +    __vdso_clock_gettime;
> +    __vdso_gettimeofday;

That existing comment certainly doesn't explain why the VDSO symbols are 
exported.

Now, __vdso_clock_gettime is presumably exported (on this and other 
architectures) because of an INTERNAL_VSYSCALL use in 
nptl/pthread_cond_timedwait.c.  But why do you need an export of 
__vdso_gettimeofday that no other architecture has?

> +  void *p = _dl_vdso_vsym ("__vdso_gettimeofday", &linux26);
> +  PTR_MANGLE (p);
> +  VDSO_SYMBOL(gettimeofday) = p;
> +
> +  p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux26);
> +  PTR_MANGLE (p);
> +  VDSO_SYMBOL(clock_gettime) = p;

Missing space before '(' in calls to VDSO_SYMBOL.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list