From patchwork Wed Oct 10 04:51:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Avila de Espindola X-Patchwork-Id: 29689 Received: (qmail 110293 invoked by alias); 10 Oct 2018 04:51:19 -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 110272 invoked by uid 89); 10 Oct 2018 04:51:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-40132.protonmail.ch Date: Wed, 10 Oct 2018 04:51:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=espindo.la; s=protonmail; t=1539147074; bh=dc7jQ8JBmnkCoJj1GnpP0PQ60pbGtW5L9K9RazRX7IE=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=qcDlPg6VOPQxsC9SqgEV9xc9ZkujhjwK8e2ywR6voaG+c8vGZ7OyRhcJLD8ZCQuhW NkzE4pxX0THNZJ1LdO+mcIpNZTdGMp2sSPp2IhugNVuJnAQiMPxxVAexDK6fJwK1yk 0FW6PTZZTnQAWlqnozW8kexCfiVnzPdqrICqW6RA= To: libc-alpha@sourceware.org, "H.J. Lu" , Florian Weimer , Szabolcs Nagy From: Rafael Avila de Espindola Reply-To: Rafael Avila de Espindola Subject: [PATCH] Enable VDSO on i386 statically linked programs. Message-ID: MIME-Version: 1.0 Now that the infrastructure is in place this is pretty easy. --- sysdeps/unix/sysv/linux/i386/init-first.c | 12 +++++------- sysdeps/unix/sysv/linux/i386/sysdep.h | 5 +++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/i386/init-first.c b/sysdeps/unix/sysv/linux/i386/init-first.c index 82ac7f5cf2..6e62dd5923 100644 --- a/sysdeps/unix/sysv/linux/i386/init-first.c +++ b/sysdeps/unix/sysv/linux/i386/init-first.c @@ -16,11 +16,10 @@ License along with the GNU C Library; if not, see . */ -#ifdef SHARED -# include -# include -# include -# include +#include +#include +#include +#include long int (*VDSO_SYMBOL (clock_gettime)) (clockid_t, struct timespec *) attribute_hidden; @@ -44,7 +43,6 @@ __vdso_platform_setup (void) VDSO_SYMBOL (clock_gettime) = p; } -# define VDSO_SETUP __vdso_platform_setup -#endif +#define VDSO_SETUP __vdso_platform_setup #include diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 3255cc78b8..cd44727ae6 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -19,6 +19,11 @@ #ifndef _LINUX_I386_SYSDEP_H #define _LINUX_I386_SYSDEP_H 1 +/* Always enable vsyscalls on i386 */ +#ifndef USE_VSYSCALL +#define USE_VSYSCALL +#endif + /* There is some commonality. */ #include #include