From owner-svn-src-all@FreeBSD.ORG Wed Feb 13 23:25:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 55AB7BF2; Wed, 13 Feb 2013 23:25:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3F04476C; Wed, 13 Feb 2013 23:25:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1DNPF3Z063527; Wed, 13 Feb 2013 23:25:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1DNPCGv063500; Wed, 13 Feb 2013 23:25:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201302132325.r1DNPCGv063500@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 13 Feb 2013 23:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r246775 - in stable/9: lib/libc/amd64/sys lib/libc/arm/sys lib/libc/i386/sys lib/libc/ia64/sys lib/libc/mips/sys lib/libc/powerpc lib/libc/powerpc/sys lib/libc/powerpc64 lib/libc/powerp... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 23:25:15 -0000 Author: kib Date: Wed Feb 13 23:25:11 2013 New Revision: 246775 URL: http://svnweb.freebsd.org/changeset/base/246775 Log: MFC r246117: Rework the __vdso_* symbols attributes to only make the symbols weak, but use normal references instead of weak. This makes the statically linked binaries to use fast gettimeofday(2) by forcing the linker to resolve references and providing the neccessary functions. Added: stable/9/lib/libc/arm/sys/__vdso_gettc.c - copied unchanged from r246117, head/lib/libc/arm/sys/__vdso_gettc.c stable/9/lib/libc/ia64/sys/__vdso_gettc.c - copied unchanged from r246117, head/lib/libc/ia64/sys/__vdso_gettc.c stable/9/lib/libc/mips/sys/__vdso_gettc.c - copied unchanged from r246117, head/lib/libc/mips/sys/__vdso_gettc.c stable/9/lib/libc/powerpc/sys/__vdso_gettc.c - copied unchanged from r246117, head/lib/libc/powerpc/sys/__vdso_gettc.c stable/9/lib/libc/powerpc64/sys/__vdso_gettc.c - copied unchanged from r246117, head/lib/libc/powerpc64/sys/__vdso_gettc.c stable/9/lib/libc/sparc64/sys/__vdso_gettc.c - copied unchanged from r246117, head/lib/libc/sparc64/sys/__vdso_gettc.c Modified: stable/9/lib/libc/amd64/sys/__vdso_gettc.c stable/9/lib/libc/arm/sys/Makefile.inc stable/9/lib/libc/i386/sys/__vdso_gettc.c stable/9/lib/libc/ia64/sys/Makefile.inc stable/9/lib/libc/mips/sys/Makefile.inc stable/9/lib/libc/powerpc/Makefile.inc stable/9/lib/libc/powerpc64/Makefile.inc stable/9/lib/libc/sparc64/Makefile.inc stable/9/lib/libc/sys/__vdso_gettimeofday.c stable/9/lib/libc/sys/gettimeofday.c stable/9/sys/sys/vdso.h Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/lib/libc/amd64/sys/__vdso_gettc.c ============================================================================== --- stable/9/lib/libc/amd64/sys/__vdso_gettc.c Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/amd64/sys/__vdso_gettc.c Wed Feb 13 23:25:11 2013 (r246775) @@ -27,9 +27,11 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include +#include "libc_private.h" static u_int __vdso_gettc_low(const struct vdso_timehands *th) @@ -41,9 +43,18 @@ __vdso_gettc_low(const struct vdso_timeh return (rv); } +#pragma weak __vdso_gettc u_int __vdso_gettc(const struct vdso_timehands *th) { return (th->th_x86_shift > 0 ? __vdso_gettc_low(th) : rdtsc32()); } + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (_elf_aux_info(AT_TIMEKEEP, tk, sizeof(*tk))); +} Modified: stable/9/lib/libc/arm/sys/Makefile.inc ============================================================================== --- stable/9/lib/libc/arm/sys/Makefile.inc Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/arm/sys/Makefile.inc Wed Feb 13 23:25:11 2013 (r246775) @@ -1,5 +1,7 @@ # $FreeBSD$ +SRCS+= __vdso_gettc.c + MDASM= Ovfork.S brk.S cerror.S pipe.S ptrace.S sbrk.S shmat.S sigreturn.S syscall.S # Don't generate default code for these syscalls: Copied: stable/9/lib/libc/arm/sys/__vdso_gettc.c (from r246117, head/lib/libc/arm/sys/__vdso_gettc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/arm/sys/__vdso_gettc.c Wed Feb 13 23:25:11 2013 (r246775, copy of r246117, head/lib/libc/arm/sys/__vdso_gettc.c) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2013 Konstantin Belousov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#pragma weak __vdso_gettc +u_int +__vdso_gettc(const struct vdso_timehands *th) +{ + + return (0); +} + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (ENOSYS); +} Modified: stable/9/lib/libc/i386/sys/__vdso_gettc.c ============================================================================== --- stable/9/lib/libc/i386/sys/__vdso_gettc.c Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/i386/sys/__vdso_gettc.c Wed Feb 13 23:25:11 2013 (r246775) @@ -27,9 +27,11 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include +#include "libc_private.h" static u_int __vdso_gettc_low(const struct vdso_timehands *th) @@ -48,3 +50,11 @@ __vdso_gettc(const struct vdso_timehands return (th->th_x86_shift > 0 ? __vdso_gettc_low(th) : rdtsc32()); } + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (_elf_aux_info(AT_TIMEKEEP, tk, sizeof(*tk))); +} Modified: stable/9/lib/libc/ia64/sys/Makefile.inc ============================================================================== --- stable/9/lib/libc/ia64/sys/Makefile.inc Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/ia64/sys/Makefile.inc Wed Feb 13 23:25:11 2013 (r246775) @@ -1,5 +1,7 @@ # $FreeBSD$ +SRCS+= __vdso_gettc.c + MDASM+= Ovfork.S brk.S cerror.S exect.S fork.S getcontext.S pipe.S ptrace.S \ sbrk.S setlogin.S sigreturn.S swapcontext.S Copied: stable/9/lib/libc/ia64/sys/__vdso_gettc.c (from r246117, head/lib/libc/ia64/sys/__vdso_gettc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/ia64/sys/__vdso_gettc.c Wed Feb 13 23:25:11 2013 (r246775, copy of r246117, head/lib/libc/ia64/sys/__vdso_gettc.c) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2013 Konstantin Belousov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#pragma weak __vdso_gettc +u_int +__vdso_gettc(const struct vdso_timehands *th) +{ + + return (0); +} + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (ENOSYS); +} Modified: stable/9/lib/libc/mips/sys/Makefile.inc ============================================================================== --- stable/9/lib/libc/mips/sys/Makefile.inc Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/mips/sys/Makefile.inc Wed Feb 13 23:25:11 2013 (r246775) @@ -1,5 +1,7 @@ # $FreeBSD$ +SRCS+= __vdso_gettc.c + MDASM= Ovfork.S brk.S cerror.S exect.S \ fork.S pipe.S ptrace.S sbrk.S syscall.S Copied: stable/9/lib/libc/mips/sys/__vdso_gettc.c (from r246117, head/lib/libc/mips/sys/__vdso_gettc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/mips/sys/__vdso_gettc.c Wed Feb 13 23:25:11 2013 (r246775, copy of r246117, head/lib/libc/mips/sys/__vdso_gettc.c) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2013 Konstantin Belousov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#pragma weak __vdso_gettc +u_int +__vdso_gettc(const struct vdso_timehands *th) +{ + + return (0); +} + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (ENOSYS); +} Modified: stable/9/lib/libc/powerpc/Makefile.inc ============================================================================== --- stable/9/lib/libc/powerpc/Makefile.inc Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/powerpc/Makefile.inc Wed Feb 13 23:25:11 2013 (r246775) @@ -1,5 +1,7 @@ # $FreeBSD$ +SRCS+= __vdso_gettc.c + # Long double is 64-bits MDSRCS+=machdep_ldisd.c SYM_MAPS+=${.CURDIR}/powerpc/Symbol.map Copied: stable/9/lib/libc/powerpc/sys/__vdso_gettc.c (from r246117, head/lib/libc/powerpc/sys/__vdso_gettc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/powerpc/sys/__vdso_gettc.c Wed Feb 13 23:25:11 2013 (r246775, copy of r246117, head/lib/libc/powerpc/sys/__vdso_gettc.c) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2013 Konstantin Belousov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#pragma weak __vdso_gettc +u_int +__vdso_gettc(const struct vdso_timehands *th) +{ + + return (0); +} + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (ENOSYS); +} Modified: stable/9/lib/libc/powerpc64/Makefile.inc ============================================================================== --- stable/9/lib/libc/powerpc64/Makefile.inc Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/powerpc64/Makefile.inc Wed Feb 13 23:25:11 2013 (r246775) @@ -1,5 +1,7 @@ # $FreeBSD$ +SRCS+= __vdso_gettc.c + # Long double is 64-bits MDSRCS+=machdep_ldisd.c SYM_MAPS+=${.CURDIR}/powerpc64/Symbol.map Copied: stable/9/lib/libc/powerpc64/sys/__vdso_gettc.c (from r246117, head/lib/libc/powerpc64/sys/__vdso_gettc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/powerpc64/sys/__vdso_gettc.c Wed Feb 13 23:25:11 2013 (r246775, copy of r246117, head/lib/libc/powerpc64/sys/__vdso_gettc.c) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2013 Konstantin Belousov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#pragma weak __vdso_gettc +u_int +__vdso_gettc(const struct vdso_timehands *th) +{ + + return (0); +} + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (ENOSYS); +} Modified: stable/9/lib/libc/sparc64/Makefile.inc ============================================================================== --- stable/9/lib/libc/sparc64/Makefile.inc Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/sparc64/Makefile.inc Wed Feb 13 23:25:11 2013 (r246775) @@ -5,6 +5,8 @@ .include "fpu/Makefile.inc" +SRCS+= __vdso_gettc.c + # Long double is quad precision GDTOASRCS+=strtorQ.c MDSRCS+=machdep_ldisQ.c Copied: stable/9/lib/libc/sparc64/sys/__vdso_gettc.c (from r246117, head/lib/libc/sparc64/sys/__vdso_gettc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/sparc64/sys/__vdso_gettc.c Wed Feb 13 23:25:11 2013 (r246775, copy of r246117, head/lib/libc/sparc64/sys/__vdso_gettc.c) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2013 Konstantin Belousov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#pragma weak __vdso_gettc +u_int +__vdso_gettc(const struct vdso_timehands *th) +{ + + return (0); +} + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (ENOSYS); +} Modified: stable/9/lib/libc/sys/__vdso_gettimeofday.c ============================================================================== --- stable/9/lib/libc/sys/__vdso_gettimeofday.c Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/sys/__vdso_gettimeofday.c Wed Feb 13 23:25:11 2013 (r246775) @@ -79,6 +79,7 @@ binuptime(struct bintime *bt, struct vds static struct vdso_timekeep *tk; +#pragma weak __vdso_gettimeofday int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) { @@ -88,7 +89,7 @@ __vdso_gettimeofday(struct timeval *tv, if (tz != NULL) return (ENOSYS); if (tk == NULL) { - error = _elf_aux_info(AT_TIMEKEEP, &tk, sizeof(tk)); + error = __vdso_gettimekeep(&tk); if (error != 0 || tk == NULL) return (ENOSYS); } @@ -101,6 +102,7 @@ __vdso_gettimeofday(struct timeval *tv, return (0); } +#pragma weak __vdso_clock_gettime int __vdso_clock_gettime(clockid_t clock_id, struct timespec *ts) { Modified: stable/9/lib/libc/sys/gettimeofday.c ============================================================================== --- stable/9/lib/libc/sys/gettimeofday.c Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/lib/libc/sys/gettimeofday.c Wed Feb 13 23:25:11 2013 (r246775) @@ -41,10 +41,7 @@ __gettimeofday(struct timeval *tv, struc { int error; - if (__vdso_gettimeofday != NULL && __vdso_gettc != NULL) - error = __vdso_gettimeofday(tv, tz); - else - error = ENOSYS; + error = __vdso_gettimeofday(tv, tz); if (error == ENOSYS) error = __sys_gettimeofday(tv, tz); return (error); Modified: stable/9/sys/sys/vdso.h ============================================================================== --- stable/9/sys/sys/vdso.h Wed Feb 13 23:22:17 2013 (r246774) +++ stable/9/sys/sys/vdso.h Wed Feb 13 23:25:11 2013 (r246775) @@ -61,13 +61,9 @@ struct timeval; struct timezone; int __vdso_clock_gettime(clockid_t clock_id, struct timespec *ts); -#pragma weak __vdso_clock_gettime - int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz); -#pragma weak __vdso_gettimeofday - u_int __vdso_gettc(const struct vdso_timehands *vdso_th); -#pragma weak __vdso_gettc +int __vdso_gettimekeep(struct vdso_timekeep **tk); #endif