From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29311 invoked by alias); 27 Jun 2014 21:58:20 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 29298 invoked by uid 89); 27 Jun 2014 21:58:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Adhemerval Zanella Cc: "GNU C. Library" , Stefani Seibold Subject: Re: [PATCH v2] Add x86 32 bit vDSO time function support In-Reply-To: Adhemerval Zanella's message of Friday, 27 June 2014 18:21:01 -0300 <53ADE03D.7070300@linux.vnet.ibm.com> References: <53ADE03D.7070300@linux.vnet.ibm.com> Message-Id: <20140627215816.050DA2C39AB@topped-with-meat.com> Date: Fri, 27 Jun 2014 21:58:00 -0000 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=1SfSXhmj-kMA:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=c7f90TIUo0HBcwaHlH0A:9 a=CjuIK1q_8ugA:10 X-SW-Source: 2014-06/txt/msg00905.txt.bz2 > * sysdeps/unix/sysv/linux/i386/Makefile [sysdep_routines]: Add dl-vdso > object. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = elf] (sysdep_routines): Add dl-vdso object. > * sysdeps/unix/sysv/linux/i386/gettimeofday.c: New file: add support > to vDSO. "support to use vDSO"? > --- a/sysdeps/unix/sysv/linux/i386/Makefile > +++ b/sysdeps/unix/sysv/linux/i386/Makefile > @@ -21,3 +21,7 @@ endif > ifeq ($(subdir),stdlib) > gen-as-const-headers += ucontext_i.sym > endif > + > +ifeq ($(subdir),elf) > +sysdep_routines += dl-vdso > +endif Instead just move that from x86_64/Makefile to x86/Makefile so it's shared. > +long int (*__vdso_clock_gettime) (clockid_t, struct timespec *) > + __attribute__ ((nocommon)); > +strong_alias (__vdso_clock_gettime, __GI___vdso_clock_gettime attribute_hidden) Use libc_hidden_data_def. > +static inline void > +_libc_vdso_platform_setup (void) Don't use a _libc_ prefix like that on a static symbol. Just use a descriptive name. > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/i386/time.c > @@ -0,0 +1,33 @@ > +/* Copyright (C) 2014 Free Software Foundation, Inc. First line is a descriptive comment. > +# define TIME_FALLBACK (void*)__time_syscall # define TIME_FALLBACK ((void *) &__time_syscall) > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/x86/bits/libc-vdso.h [...] > +extern long int (*__vdso_clock_gettime) (clockid_t, struct timespec *); libc_hidden_proto here to go with libc_hidden_def. Also, this header really should not be in bits/. That only makes sense for installed headers. > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/x86/clock_gettime.c > @@ -0,0 +1,20 @@ > +#include "bits/libc-vdso.h" Missing top comment and license header. > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/x86/timespec_get.c > @@ -0,0 +1,10 @@ > +#include "bits/libc-vdso.h" Here too.