From patchwork Fri Jun 14 15:28:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 166830 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2200980ilk; Fri, 14 Jun 2019 08:29:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrYaxZ/EOfvE5HxJhVxfsiCCqrO/Dglep23Pg1DalVF07rNwAxkTs9ArbzFH3fZ6mqhSFq X-Received: by 2002:a62:d0:: with SMTP id 199mr67445166pfa.253.1560526179991; Fri, 14 Jun 2019 08:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560526179; cv=none; d=google.com; s=arc-20160816; b=agMNtoVN3jXTOmFt5EnqzxOLU99x/xyiBnl5I7WXPewtDc9apX8nKh0z3l+eq/6vPO B6L+hOcmiwXEPOodZAgCVZ32t50HJs6yWgTiWev+X5XhArZlVxNrOv9VT2gsZaQ1ZB8b bYbM62KqFqvgQmf3KsGP4qj470co1vvDav/MIHqyIb2Lt6ZAlERDlThXMi2qL8oXEH+6 hjv/2lszYCAv+TWz95mtNJRrF5AQN+3pDoO3V3sIubF0hZhl3nGyyNRivYrnCFnI+zME 8LDANA7E+gXn1K7ya3whUzLi/XV+hmjTr8qyCi7foDBUKmaGCRfrhuB0fRyNSM6adLbh yf2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=Qb081wnbH1reaEliqBrnt5t6jRPvLqb/xuNtp32baTg=; b=VdItpcg30uQeEz8XTS6zSdOVY0WB/Y2IemOdetSJf3F9MWnDNuH0qk4ij2fl2aFtGM c/khzEdou5sYEwlIY4t4jeevzl1ePT76/or8BIoss24Ej3YRUMrdKJy2BD5X9JyrCAkw WRJxN/E81llGcFv2ZDNepBzQ7YA6MhAXnboYP/Dnkl5bT9Q4bnlZdZhckuexmPmwUEf5 EXBhPxYuHStpiZGRFs5WpzpqOUhmLnPUi4FOsKX0Pn3qHDphJcCUK0WeLkyPsoL2IDXK d8hVcEWekhV0f2lckg0gOWXduS6FB/9qhWyeuQPrRfsGzBv34XlqWTC3EkvLio9yXcVJ Ruag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=gzMebXb7; dkim=pass header.i=@linaro.org header.s=google header.b=pp0x9a72; spf=pass (google.com: domain of libc-alpha-return-102736-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102736-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o24si2597577pll.280.2019.06.14.08.29.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 08:29:39 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-102736-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=gzMebXb7; dkim=pass header.i=@linaro.org header.s=google header.b=pp0x9a72; spf=pass (google.com: domain of libc-alpha-return-102736-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102736-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=kRtkbJbBaPXbCe+K/4pxgD+3VDt7Uwo Z2AfakJK4QF7s5zCm4FtoNbxpqL3UwyTlhVeJDuLpXGO9EFrmASadcef2wuunJR3 Vltcjb2GxAI3U9bH7LG+uE4+9V14CRCGL0m27L3sa50n/wRZGps7Z8FjOloBwvnr mKgSoqSJGy88= 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:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=hhhmMqB1vT7jLa6t7mLRGOtXmS0=; b=gzMeb Xb7gnfvkaUD9JHsAwsI+jZrMw89A24sbHIVmdds6t2p4L0big9NOpVv9+abVsLks 8q1Vs80S31TXbt4mE5YvwbYTls0mix+2aNFxQnwI7aWXGePp/VyA5TuN9mQ0nlTv pb/9d0xXTOlZ2He8OzYLBGdMjNcfPVUQzVj8ds= Received: (qmail 116877 invoked by alias); 14 Jun 2019 15:29:20 -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 116793 invoked by uid 89); 14 Jun 2019 15:29:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-ua1-f65.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=Qb081wnbH1reaEliqBrnt5t6jRPvLqb/xuNtp32baTg=; b=pp0x9a72dh09FODiJpCzyk1Z9D2TF8pWQxJQ0o1os2wSXNBDVxnyRH+JyHmBGV4WuG zyJmp7zUt4ovtAZ+yE5tmKqTwnPPUo6TqKLIG2jQBTRXcPsUqc8x4+0M3eC/jUZauRhe No/1sBrd6Ge/nIQLz3R5fLG6wYQESC1rjNozEcpKRnTg7JpUT+eZQdAtdUC2hKO7d/JI O9Y3GJ205dvu75rIXQzrVxsnUFW+jrVkNQlNxNlD9VnFYmrD6dfkzdUlf3tWYyHm0cCL WO1DIWKu6EC6L7uTtQS/POhj8iLiqE7r37kh1QX+LcTDQmkc473MYAJqpF2aG9M1esYr hLeA== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 02/12] riscv: Enable VDSO for static linking Date: Fri, 14 Jun 2019 12:28:58 -0300 Message-Id: <20190614152908.8101-2-adhemerval.zanella@linaro.org> In-Reply-To: <20190614152908.8101-1-adhemerval.zanella@linaro.org> References: <20190614152908.8101-1-adhemerval.zanella@linaro.org> Checked on riscv64-linux-gnu-rv64imafdc-lp64d qemu system with some static tests. [BZ #19767] * sysdeps/unix/sysv/linux/riscv/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/riscv/libc-vdso.h: Likewise. * sysdeps/unix/sysv/linux/riscv/sysdep.h (ALWAYS_USE_VSYSCALL): Define. --- sysdeps/unix/sysv/linux/riscv/init-first.c | 8 +++----- sysdeps/unix/sysv/linux/riscv/libc-vdso.h | 6 +----- sysdeps/unix/sysv/linux/riscv/sysdep.h | 3 +++ 3 files changed, 7 insertions(+), 10 deletions(-) -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/riscv/init-first.c b/sysdeps/unix/sysv/linux/riscv/init-first.c index 8134c79695..98a8ce33ad 100644 --- a/sysdeps/unix/sysv/linux/riscv/init-first.c +++ b/sysdeps/unix/sysv/linux/riscv/init-first.c @@ -17,9 +17,8 @@ License along with the GNU C Library; if not, see . */ -#ifdef SHARED -# include -# include +#include +#include long int (*VDSO_SYMBOL (getcpu)) (unsigned int *, unsigned int *, void *) attribute_hidden; @@ -52,7 +51,6 @@ _libc_vdso_platform_setup (void) VDSO_SYMBOL (clock_getres) = p; } -# define VDSO_SETUP _libc_vdso_platform_setup -#endif +#define VDSO_SETUP _libc_vdso_platform_setup #include diff --git a/sysdeps/unix/sysv/linux/riscv/libc-vdso.h b/sysdeps/unix/sysv/linux/riscv/libc-vdso.h index b0c46f3cb7..2373292ab9 100644 --- a/sysdeps/unix/sysv/linux/riscv/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/riscv/libc-vdso.h @@ -20,9 +20,7 @@ #ifndef _LIBC_VDSO_H #define _LIBC_VDSO_H -#ifdef SHARED - -# include +#include extern long int (*VDSO_SYMBOL (getcpu)) (unsigned int *, unsigned int *, void *) attribute_hidden; @@ -33,6 +31,4 @@ extern long int (*VDSO_SYMBOL (clock_gettime)) (clockid_t, struct timespec *) extern long int (*VDSO_SYMBOL (clock_getres)) (clockid_t, struct timespec *) attribute_hidden; -#endif - #endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index 5470ea3d2a..caf013a9a1 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -19,6 +19,9 @@ #ifndef _LINUX_RISCV_SYSDEP_H #define _LINUX_RISCV_SYSDEP_H 1 +/* Always enable vsyscalls on riscv */ +#define ALWAYS_USE_VSYSCALL 1 + #include #include