From patchwork Wed Apr 15 20:21:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 461638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2D6A51401AB for ; Thu, 16 Apr 2015 06:23:06 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=sourceware.org header.i=@sourceware.org header.b=CliG5AW2; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=leH zf9XI16xFFmrawbm9MLcTVn3RKY6+ZUSUTQLnAdvvDCT+U6t+ubI8C10ilIJws9A dEPHdybun7cGF/FqMjWuFAbhIB2P2FALgkPggR0W7A9z0OjB2Rsf1mPp8+n48ylP 59ZccHiDkgiVNeIveMLJOsKJXU6S+wIsdaP/1rRA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=+ixCwxSBW 1SnJIuIY/B1fsFUhkk=; b=CliG5AW2WWlA07fh4UJ6Aw1w730TCezh5DaMr8DT6 xGR9Q+fPQhoiiQshauhidpbDgGBK6xY68uurl5Sh38V7UZkEYKWsLSfEF1KzU15q i+x4S4k/g/YtsGJKwmWE5Cpvo4V5lUZCssBkjTg47EVYQcfdZ5IpAYwwZLKfYm1x 1I= Received: (qmail 59664 invoked by alias); 15 Apr 2015 20:22:41 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 59577 invoked by uid 89); 15 Apr 2015 20:22:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f175.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=m5q1Ig3wVERrkTEpRyg61zOXMHrAUFalSq1qMVtYMuA=; b=kFlRKcemPILbEADdoT1TP8AYtaJ+7Ht7ZVowV/xgWwzmyVZpXPMMVkK62l2/u6lvSE GLSqYqtw1wjcqDbxKcGcZH5pJPp2PBz+qT2S3PyL+7qq3DTBLvcxcZvtpVtt/X6o9cEN YKfl0cJFjyqY8cNDIcsZ1UQ7IY8lDIYdCREzyZt25c2r80xTQ4KfhK3jY3Kv4nLCVItp L62+p3SiWQmZ+nfL5VoJrV+iyjmsBWtMjCvemxYBKB0gXvcGCuNVygftT2hAvlZ8Atq3 /q4ntHkpSZU99GvplOBzUZZ50sq9CqI1Bi5LdGyJrvXzYinpW4zuzbzV32VAOzddH6v2 kbVA== X-Gm-Message-State: ALoCoQknMMlPavprf5D2W840W89XzahKuE1kz+AOr2XZS3zsQsxVIlHmoD2+THMPUtO8RqMjltk+ X-Received: by 10.140.148.216 with SMTP id 207mr35535008qhu.62.1429129319497; Wed, 15 Apr 2015 13:21:59 -0700 (PDT) Message-ID: <552EC864.60900@linaro.org> Date: Wed, 15 Apr 2015 17:21:56 -0300 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: libc-alpha@sourceware.org Subject: [PATCH 3/4] libc-vdso.h place consolidation This patch moves the libc-vdso.h internal header from bits folder to default architecture one and also corrects the remaning includes in the files. --- * nptl/pthread_cond_timedwait.c: Change include bits/libc-vdso.h to just libc-vdso.h. * sysdeps/powerpc/powerpc32/backtrace.c: Likewise. * sysdeps/powerpc/powerpc64/backtrace.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/init-first.c: Likewise. * sysdeps/unix/sysv/linux/clock_getres.c: Likewise. * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise. * sysdeps/unix/sysv/linux/gettimeofday.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/init-first.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/time.c: Likewise. * sysdeps/unix/sysv/linux/s390/init-first.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/libc-vdso.h: Move to ... * sysdeps/unix/sysv/linux/aarch64/libc-vdso.h: ... here. * sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h: Move to ... * sysdeps/unix/sysv/linux/powerpc/libc-vdso.h: ... here. * sysdeps/unix/sysv/linux/s390/bits/libc-vdso.h: Move to ... * sysdeps/unix/sysv/linux/s390/libc-vdso.h: ... here. * sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h: Move to ... * sysdeps/unix/sysv/linux/tile/libc-vdso.h: ... here. --- diff --git a/nptl/pthread_cond_timedwait.c b/nptl/pthread_cond_timedwait.c index bf80467..10b0a61 100644 --- a/nptl/pthread_cond_timedwait.c +++ b/nptl/pthread_cond_timedwait.c @@ -33,7 +33,7 @@ # undef INLINE_VSYSCALL # define INLINE_VSYSCALL INLINE_SYSCALL #else -# include +# include #endif /* Cleanup handler, defined in pthread_cond_wait.c. */ diff --git a/sysdeps/powerpc/powerpc32/backtrace.c b/sysdeps/powerpc/powerpc32/backtrace.c index fc296bd..06886c7 100644 --- a/sysdeps/powerpc/powerpc32/backtrace.c +++ b/sysdeps/powerpc/powerpc32/backtrace.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include /* This is the stack layout we see with every stack frame. Note that every routine is required by the ABI to lay out the stack diff --git a/sysdeps/powerpc/powerpc64/backtrace.c b/sysdeps/powerpc/powerpc64/backtrace.c index 89b1ce0..3105bad 100644 --- a/sysdeps/powerpc/powerpc64/backtrace.c +++ b/sysdeps/powerpc/powerpc64/backtrace.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include /* This is the stack layout we see with every stack frame. Note that every routine is required by the ABI to lay out the stack diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/aarch64/bits/libc-vdso.h deleted file mode 100644 index 1f6bb36..0000000 --- a/sysdeps/unix/sysv/linux/aarch64/bits/libc-vdso.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 2009-2015 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#ifndef _LIBC_VDSO_H -#define _LIBC_VDSO_H - -#ifdef SHARED - -extern void (*__vdso_gettimeofday) (struct timeval *, void *) - attribute_hidden; -extern void (*__vdso_clock_gettime) (clockid_t, struct timespec *); -extern void (*__vdso_clock_getres) (clockid_t, struct timespec *); - -#endif - -#endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/aarch64/init-first.c b/sysdeps/unix/sysv/linux/aarch64/init-first.c index 01241aa..d99c821 100644 --- a/sysdeps/unix/sysv/linux/aarch64/init-first.c +++ b/sysdeps/unix/sysv/linux/aarch64/init-first.c @@ -21,7 +21,7 @@ # undef __gettimeofday # undef __clock_gettime # undef __clock_getres -# include +# include void (*__vdso_gettimeofday) (struct timeval *, void *) attribute_hidden; void (*__vdso_clock_gettime) (clockid_t, struct timespec *); diff --git a/sysdeps/unix/sysv/linux/aarch64/libc-vdso.h b/sysdeps/unix/sysv/linux/aarch64/libc-vdso.h new file mode 100644 index 0000000..1f6bb36 --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/libc-vdso.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _LIBC_VDSO_H +#define _LIBC_VDSO_H + +#ifdef SHARED + +extern void (*__vdso_gettimeofday) (struct timeval *, void *) + attribute_hidden; +extern void (*__vdso_clock_gettime) (clockid_t, struct timespec *); +extern void (*__vdso_clock_getres) (clockid_t, struct timespec *); + +#endif + +#endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c index 60fbde6..9b31d8c 100644 --- a/sysdeps/unix/sysv/linux/clock_getres.c +++ b/sysdeps/unix/sysv/linux/clock_getres.c @@ -27,7 +27,7 @@ # undef INLINE_VSYSCALL # define INLINE_VSYSCALL INLINE_SYSCALL #else -# include +# include #endif #define SYSCALL_GETRES \ diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c index 57db8ee..93aa095 100644 --- a/sysdeps/unix/sysv/linux/clock_gettime.c +++ b/sysdeps/unix/sysv/linux/clock_gettime.c @@ -27,7 +27,7 @@ # undef INLINE_VSYSCALL # define INLINE_VSYSCALL INLINE_SYSCALL #else -# include +# include #endif #ifndef SYSCALL_GETTIME diff --git a/sysdeps/unix/sysv/linux/gettimeofday.c b/sysdeps/unix/sysv/linux/gettimeofday.c index 5eaafc0..4c2019e 100644 --- a/sysdeps/unix/sysv/linux/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/gettimeofday.c @@ -19,7 +19,7 @@ #include #include #if HAVE_GETTIMEOFDAY_VSYSCAL -# include +# include #endif /* Get the current time of day and timezone information, diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h deleted file mode 100644 index 63a7a9b..0000000 --- a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Resolve function pointers to VDSO functions. - Copyright (C) 2005-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - - -#ifndef _LIBC_VDSO_H -#define _LIBC_VDSO_H - -#ifdef SHARED - -extern void *__vdso_gettimeofday attribute_hidden; - -extern void *__vdso_clock_gettime; - -extern void *__vdso_clock_getres; - -extern void *__vdso_get_tbfreq; - -extern void *__vdso_getcpu; - -extern void *__vdso_time; - -#if defined(__PPC64__) || defined(__powerpc64__) -extern void *__vdso_sigtramp_rt64; -#else -extern void *__vdso_sigtramp32; -extern void *__vdso_sigtramp_rt32; -#endif - -#if (defined(__PPC64__) || defined(__powerpc64__)) && _CALL_ELF != 2 -/* The correct solution is for _dl_vdso_vsym to return the address of the OPD - for the kernel VDSO function. That address would then be stored in the - __vdso_* variables and returned as the result of the IFUNC resolver function. - Yet, the kernel does not contain any OPD entries for the VDSO functions - (incomplete implementation). However, PLT relocations for IFUNCs still expect - the address of an OPD to be returned from the IFUNC resolver function (since - PLT entries on PPC64 are just copies of OPDs). The solution for now is to - create an artificial static OPD for each VDSO function returned by a resolver - function. The TOC value is set to a non-zero value to avoid triggering lazy - symbol resolution via .glink0/.plt0 for a zero TOC (requires thread-safe PLT - sequences) when the dynamic linker isn't prepared for it e.g. RTLD_NOW. None - of the kernel VDSO routines use the TOC or AUX values so any non-zero value - will work. Note that function pointer comparisons will not use this artificial - static OPD since those are resolved via ADDR64 relocations and will point at - the non-IFUNC default OPD for the symbol. Lastly, because the IFUNC relocations - are processed immediately at startup the resolver functions and this code need - not be thread-safe, but if the caller writes to a PLT slot it must do so in a - thread-safe manner with all the required barriers. */ -#define VDSO_IFUNC_RET(value) \ - ({ \ - static Elf64_FuncDesc vdso_opd = { .fd_toc = ~0x0 }; \ - vdso_opd.fd_func = (Elf64_Addr)value; \ - &vdso_opd; \ - }) - -#else -#define VDSO_IFUNC_RET(value) ((void *) (value)) -#endif - -#endif - -#endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c b/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c index fe8c5a1..5b6bb51 100644 --- a/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c +++ b/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include hp_timing_t diff --git a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c index f50cf7e..f561ac7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c @@ -21,7 +21,7 @@ #ifdef SHARED # include -# include +# include # include void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday"); diff --git a/sysdeps/unix/sysv/linux/powerpc/init-first.c b/sysdeps/unix/sysv/linux/powerpc/init-first.c index c1903ca..b4917d1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/init-first.c +++ b/sysdeps/unix/sysv/linux/powerpc/init-first.c @@ -21,7 +21,7 @@ # undef __gettimeofday # undef __clock_gettime # undef __clock_getres -# include +# include void *__vdso_gettimeofday attribute_hidden; void *__vdso_clock_gettime; diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h new file mode 100644 index 0000000..63a7a9b --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h @@ -0,0 +1,76 @@ +/* Resolve function pointers to VDSO functions. + Copyright (C) 2005-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + + +#ifndef _LIBC_VDSO_H +#define _LIBC_VDSO_H + +#ifdef SHARED + +extern void *__vdso_gettimeofday attribute_hidden; + +extern void *__vdso_clock_gettime; + +extern void *__vdso_clock_getres; + +extern void *__vdso_get_tbfreq; + +extern void *__vdso_getcpu; + +extern void *__vdso_time; + +#if defined(__PPC64__) || defined(__powerpc64__) +extern void *__vdso_sigtramp_rt64; +#else +extern void *__vdso_sigtramp32; +extern void *__vdso_sigtramp_rt32; +#endif + +#if (defined(__PPC64__) || defined(__powerpc64__)) && _CALL_ELF != 2 +/* The correct solution is for _dl_vdso_vsym to return the address of the OPD + for the kernel VDSO function. That address would then be stored in the + __vdso_* variables and returned as the result of the IFUNC resolver function. + Yet, the kernel does not contain any OPD entries for the VDSO functions + (incomplete implementation). However, PLT relocations for IFUNCs still expect + the address of an OPD to be returned from the IFUNC resolver function (since + PLT entries on PPC64 are just copies of OPDs). The solution for now is to + create an artificial static OPD for each VDSO function returned by a resolver + function. The TOC value is set to a non-zero value to avoid triggering lazy + symbol resolution via .glink0/.plt0 for a zero TOC (requires thread-safe PLT + sequences) when the dynamic linker isn't prepared for it e.g. RTLD_NOW. None + of the kernel VDSO routines use the TOC or AUX values so any non-zero value + will work. Note that function pointer comparisons will not use this artificial + static OPD since those are resolved via ADDR64 relocations and will point at + the non-IFUNC default OPD for the symbol. Lastly, because the IFUNC relocations + are processed immediately at startup the resolver functions and this code need + not be thread-safe, but if the caller writes to a PLT slot it must do so in a + thread-safe manner with all the required barriers. */ +#define VDSO_IFUNC_RET(value) \ + ({ \ + static Elf64_FuncDesc vdso_opd = { .fd_toc = ~0x0 }; \ + vdso_opd.fd_func = (Elf64_Addr)value; \ + &vdso_opd; \ + }) + +#else +#define VDSO_IFUNC_RET(value) ((void *) (value)) +#endif + +#endif + +#endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c b/sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c index 11d3d6b..5bf540c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c +++ b/sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c @@ -17,7 +17,7 @@ #include #include -#include +#include int diff --git a/sysdeps/unix/sysv/linux/powerpc/time.c b/sysdeps/unix/sysv/linux/powerpc/time.c index d72e651..0c26508 100644 --- a/sysdeps/unix/sysv/linux/powerpc/time.c +++ b/sysdeps/unix/sysv/linux/powerpc/time.c @@ -21,7 +21,7 @@ # include # include # include -# include +# include # include void *time_ifunc (void) asm ("time"); diff --git a/sysdeps/unix/sysv/linux/s390/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/s390/bits/libc-vdso.h deleted file mode 100644 index 3fd3d06..0000000 --- a/sysdeps/unix/sysv/linux/s390/bits/libc-vdso.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Resolve function pointers to VDSO functions. - Copyright (C) 2008-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - - -#ifndef _LIBC_VDSO_H -#define _LIBC_VDSO_H - -#ifdef SHARED - -extern long int (*__vdso_gettimeofday) (struct timeval *, void *) - attribute_hidden; - -extern long int (*__vdso_clock_gettime) (clockid_t, struct timespec *); - -extern long int (*__vdso_clock_getres) (clockid_t, struct timespec *); - -#endif - -#endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/s390/init-first.c b/sysdeps/unix/sysv/linux/s390/init-first.c index 3f167a7..2e00a99 100644 --- a/sysdeps/unix/sysv/linux/s390/init-first.c +++ b/sysdeps/unix/sysv/linux/s390/init-first.c @@ -21,7 +21,7 @@ # undef __gettimeofday # undef __clock_gettime # undef __clock_getres -# include +# include long int (*__vdso_gettimeofday) (struct timeval *, void *) attribute_hidden; diff --git a/sysdeps/unix/sysv/linux/s390/libc-vdso.h b/sysdeps/unix/sysv/linux/s390/libc-vdso.h new file mode 100644 index 0000000..3fd3d06 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/libc-vdso.h @@ -0,0 +1,34 @@ +/* Resolve function pointers to VDSO functions. + Copyright (C) 2008-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + + +#ifndef _LIBC_VDSO_H +#define _LIBC_VDSO_H + +#ifdef SHARED + +extern long int (*__vdso_gettimeofday) (struct timeval *, void *) + attribute_hidden; + +extern long int (*__vdso_clock_gettime) (clockid_t, struct timespec *); + +extern long int (*__vdso_clock_getres) (clockid_t, struct timespec *); + +#endif + +#endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h deleted file mode 100644 index 44f8286..0000000 --- a/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Resolve function pointers to VDSO functions. - Copyright (C) 2012-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - - -#ifndef _LIBC_VDSO_H -#define _LIBC_VDSO_H - -#ifdef SHARED - -struct syscall_return_value -{ - long int value; - long int error; -}; - -extern struct syscall_return_value (*__vdso_gettimeofday) (struct timeval *, - void *) - attribute_hidden; - -extern struct syscall_return_value (*__vdso_clock_gettime) (clockid_t, - struct timespec *); - -#endif - -#endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/tile/libc-vdso.h b/sysdeps/unix/sysv/linux/tile/libc-vdso.h new file mode 100644 index 0000000..44f8286 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/libc-vdso.h @@ -0,0 +1,40 @@ +/* Resolve function pointers to VDSO functions. + Copyright (C) 2012-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + + +#ifndef _LIBC_VDSO_H +#define _LIBC_VDSO_H + +#ifdef SHARED + +struct syscall_return_value +{ + long int value; + long int error; +}; + +extern struct syscall_return_value (*__vdso_gettimeofday) (struct timeval *, + void *) + attribute_hidden; + +extern struct syscall_return_value (*__vdso_clock_gettime) (clockid_t, + struct timespec *); + +#endif + +#endif /* _LIBC_VDSO_H */