From patchwork Fri Jun 27 16:00:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nathan Lynch X-Patchwork-Id: 4436461 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1C31E9F319 for ; Fri, 27 Jun 2014 16:02:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49C8A20384 for ; Fri, 27 Jun 2014 16:02:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 596D020270 for ; Fri, 27 Jun 2014 16:02:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0Ya9-00016l-T7; Fri, 27 Jun 2014 16:00:57 +0000 Received: from relay1.mentorg.com ([192.94.38.131]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0Ya6-0000tH-6e for linux-arm-kernel@lists.infradead.org; Fri, 27 Jun 2014 16:00:54 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1X0YZe-0000tH-87 from Nathan_Lynch@mentor.com ; Fri, 27 Jun 2014 09:00:26 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 27 Jun 2014 09:00:26 -0700 Received: from [127.0.0.1] (147.34.91.1) by SVR-ORW-FEM-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Fri, 27 Jun 2014 09:00:25 -0700 Message-ID: <53AD9517.4060400@mentor.com> Date: Fri, 27 Jun 2014 11:00:23 -0500 From: Nathan Lynch User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Jan Glauber Subject: Re: [PATCH v7 0/9] ARM: VDSO References: <1403493118-7597-1-git-send-email-nathan_lynch@mentor.com> <20140627085125.GA7088@hal> In-Reply-To: <20140627085125.GA7088@hal> X-OriginalArrivalTime: 27 Jun 2014 16:00:26.0057 (UTC) FILETIME=[E8DEFB90:01CF9220] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140627_090054_262507_1F801B58 X-CRM114-Status: GOOD ( 14.31 ) X-Spam-Score: -0.0 (/) Cc: steve.capper@linaro.org, ard.biesheuvel@linaro.org, sboyd@codeaurora.org, will.deacon@arm.com, keescook@google.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 06/27/2014 03:51 AM, Jan Glauber wrote: > On Sun, Jun 22, 2014 at 10:11:49PM -0500, Nathan Lynch wrote: >> Provide fast userspace implementations of gettimeofday and >> clock_gettime on systems that implement the generic timers extension >> defined in ARMv7. This follows the example of arm64 in conception but >> significantly differs in some aspects of the implementation (C vs >> assembly, mainly). > > Hi Nathan, > > applying your patches I get the following compile error under Ubuntu 12.04: > > CC arch/arm/kernel/vdso.o > LDS arch/arm/kernel/vdso/vdso.lds > CC arch/arm/kernel/vdso/vgettimeofday.o > AS arch/arm/kernel/vdso/datapage.o > VDSOL arch/arm/kernel/vdso/vdso.so.raw > HOSTCC arch/arm/kernel/vdso/vdsomunge > arch/arm/kernel/vdso/vdsomunge.c: In function ‘main’: > arch/arm/kernel/vdso/vdsomunge.c:152:16: error: ‘EF_ARM_ABI_FLOAT_HARD’ undeclared (first use in this function) > arch/arm/kernel/vdso/vdsomunge.c:152:16: note: each undeclared identifier is reported only once for each function it appears in > arch/arm/kernel/vdso/vdsomunge.c:156:34: error: ‘EF_ARM_ABI_FLOAT_SOFT’ undeclared (first use in this function) > make[2]: *** [arch/arm/kernel/vdso/vdsomunge] Error 1 > make[1]: *** [arch/arm/kernel/vdso] Error 2 > make: *** [arch/arm/kernel] Error 2 > > Looks like the libc dev is too old (EF_ARM_ABI_FLOAT_* not in /usr/include/elf.h). > On a more recent Ubuntu it compiles fine. Not sure how to solve this, maybe disable > vdso if the libc is too old? We should just define some of the needed ELF constants in the tool if the host lacks them. EF_ARM_ABI_FLOAT_HARD/SOFT were added in 2012, EF_ARM_EABI_VER5 in 2009... everything else the tool uses has been there for twelve years or more. Thanks for the report -- please try the below? diff --git a/arch/arm/kernel/vdso/vdsomunge.c b/arch/arm/kernel/vdso/vdsomunge.c index 823b84d142bc..b586ef699fb8 100644 --- a/arch/arm/kernel/vdso/vdsomunge.c +++ b/arch/arm/kernel/vdso/vdsomunge.c @@ -67,6 +67,21 @@ #define HOST_ORDER ELFDATA2MSB #endif +/* Some of the ELF constants we'd like to use were added to + * relatively recently. + */ +#ifndef EF_ARM_EABI_VER5 +#define EF_ARM_EABI_VER5 0x05000000 +#endif + +#ifndef EF_ARM_ABI_FLOAT_SOFT +#define EF_ARM_ABI_FLOAT_SOFT 0x200 +#endif + +#ifndef EF_ARM_ABI_FLOAT_HARD +#define EF_ARM_ABI_FLOAT_HARD 0x400 +#endif + static const char *outfile; static void cleanup(void)