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: =?utf-8?q?Rafael_=C3=81vila_de_Esp=C3=ADndola?= X-Patchwork-Id: 981681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-96332-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=espindo.la Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="yRv2Z6ON"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=espindo.la header.i=@espindo.la header.b="qcDlPg6V"; dkim-atps=neutral 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 42VMBP1fsBz9sB7 for ; Wed, 10 Oct 2018 15:51:25 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:from:reply-to:subject:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=MpGRFojHBEykOVugc5tHJw81G7ciaGviNDjTQ9Y7BE6rnSTJz0S0Y oQigL03+hfxCRDrSlGeRRypWWwMIojdkyxCofAnko4bm0ZOcOQ8m8gAyN6/jirqj 5TrLuzrZPrAR1E6LF8QvSAzO54J8W+a6ySH/023euf2lj6zsHfAfFc= 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:date:to:from:reply-to:subject:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=JybGEmR1tZr7lH4rkIe24z/TM2Q=; b=yRv2Z6ONcchdHAR36oHzQYWoeUR5 +L0foab7UPmQpkVwJaJhOqAwQxFWkAKWW8TPESBKIQnLZcMzC5518rnB+VYkleAN XJ4byu+X95hxCbRNHVYRqwFx/7ep6XUYy9hY9BL8AF2YSzV24YcPMNJxNDB1LE25 61oGnsDXOhl5Umc= 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