Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D30BC2BA19 for ; Wed, 15 Apr 2020 14:42:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70DBD2076D for ; Wed, 15 Apr 2020 14:42:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KFk9alLA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="Rzm5dxhT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70DBD2076D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To :Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TrCr8YaKtrXKuZI1mDLlJ9OwmvLg/1PUlN/6+Ie7Iy0=; b=KFk9alLA+Oph1c9u+svhuzWcw GBJ7zDZSCT5Z/XsC0Bvz/Dxea9STZsIbwckGSMGB28K3fBiZPZQAHawrhN9FC5xy9LXPQsRr0aICj k/V679TZeVf4M8+30E1mgT8zpZD43hBQtLLnnD2xVy7CQDxVxsqu26pIoUTUduBnefr/ov80KRITW kzOeosbNkMjJN3QOLXUYKjgPAzeh0gtiydax+ZmEIfnTTx5FYXyb9cj3ldhjrpWpK8oYuJB3Zq+V4 WPoKcTmuq6iBd+KRIoR43fRNDiFGLpw9LiFxzuPmlUN9qlgAawIMt23irg/NZTruzkm2qGJg8A2mm QHDVKx2hg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOjFC-0007zD-Nk; Wed, 15 Apr 2020 14:42:26 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOjF9-0007yU-Bd for linux-riscv@lists.infradead.org; Wed, 15 Apr 2020 14:42:24 +0000 Received: by mail-pf1-x443.google.com with SMTP id u65so49218pfb.4 for ; Wed, 15 Apr 2020 07:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TrCr8YaKtrXKuZI1mDLlJ9OwmvLg/1PUlN/6+Ie7Iy0=; b=Rzm5dxhTeaUONGsH972GQ1cAaKsulUeSHXueDBEsqI8cmXTh3SCPNcNqjQ5CFDTa5h EBQ9soIZStcseclUh0yP5zlUIowfh0ce0sZYGy/PfzX/U+/NGIrjEh3eABab7h+60/hz pgsokVn1zTw/hG3mJPqkplXu3r554x7uKaTXB0r0q3T6r1ELTx5v9wViytUbbto8Q8Ip dpym/NWKqOLMvWLZOorTFDWkgr536ve61EELqLbC0ALfHW0VWLJHXG9ZAzadzRLExZCW X2qP2xQy66PsBltBjdCkqzG3vbqeK2UOlflEoG9zaYgGLAsb6H997UH8MDClWBTP/Uka +rlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TrCr8YaKtrXKuZI1mDLlJ9OwmvLg/1PUlN/6+Ie7Iy0=; b=gW5t1SOEqp5w1+CVcXJhsivTuqGN2pXVXKZUN60Ghhnk6pFCfnLjXfwa0VNNdJ6mTs /JLz4kAYmXATmR7bDkBOc3YuQ+fV8T7fIwozSWXxGQKVmsahtFYSyoRagn2RzX0JiY1I DwC4LdD1rFCTMtHDuRyyOn5jkkHOOacFL4AAQgGahRP2L3MA/MJ4J8D/OZ2sCTv6oFhG IiQYvtuckOOihBgUqvCMfmPjZ2wi6ZkgqYwHPf8b/R39K1qaAvieQp+BO9F6Omc8OOVY MYoGXO5N2lJDV4221o+RDq+NCDfPLk4p8YBpAMBIaRsxOXRsFjUJG26mtlDUOmdyUBcB 4hLA== X-Gm-Message-State: AGi0PuYo+Wjom+XFguazuJusghJFlOHnqZalEu84FAhOLaMnizcEII9B jqhcPGo1JzQxSHlYINMD9uG4bw== X-Google-Smtp-Source: APiQypKrD/31MKHUWmycbWqZm3NAXgiF4vyGNvf1olANylF0PjsMdQ5ZiArHj6E665hYlxTSD05JxQ== X-Received: by 2002:aa7:8d97:: with SMTP id i23mr27432269pfr.325.1586961741436; Wed, 15 Apr 2020 07:42:21 -0700 (PDT) Received: from google.com ([2620:15c:2ce:0:9efe:9f1:9267:2b27]) by smtp.gmail.com with ESMTPSA id i15sm2199851pfo.195.2020.04.15.07.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 07:42:20 -0700 (PDT) Date: Wed, 15 Apr 2020 07:42:17 -0700 From: Fangrui Song To: Ilie Halip Subject: Re: [PATCH v2] riscv: fix vdso build with lld Message-ID: <20200415144217.cxxdfeeepzgikp4n@google.com> References: <20200415142959.25673-1-ilie.halip@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200415142959.25673-1-ilie.halip@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_074223_421396_7C33B3ED X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Ou , Greg Kroah-Hartman , Jordan Rupprecht , Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Palmer Dabbelt , Paul Walmsley , linux-riscv@lists.infradead.org, Thomas Gleixner , Mao Han Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On 2020-04-15, Ilie Halip wrote: >When building with the LLVM linker this error occurrs: > LD arch/riscv/kernel/vdso/vdso-syms.o > ld.lld: error: no input files > >This happens because the lld treats -R as an alias to -rpath, as opposed >to ld where -R means --just-symbols. > >Use the long option name for compatibility between the two. > >Link: https://github.com/ClangBuiltLinux/linux/issues/805 >Reported-by: Dmitry Golovin >Reviewed-by: Nick Desaulniers >Signed-off-by: Ilie Halip > >--- >Changed in v2: > * a comment line dropped, another one slightly reworded > * added Nick's Reviewed-by >--- > arch/riscv/kernel/vdso/Makefile | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile >index 33b16f4212f7..a4ee3a0e7d20 100644 >--- a/arch/riscv/kernel/vdso/Makefile >+++ b/arch/riscv/kernel/vdso/Makefile >@@ -33,15 +33,15 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE > $(call if_changed,vdsold) > > # We also create a special relocatable object that should mirror the symbol >-# table and layout of the linked DSO. With ld -R we can then refer to >-# these symbols in the kernel code rather than hand-coded addresses. >+# table and layout of the linked DSO. With ld --just-symbols we can then >+# refer to these symbols in the kernel code rather than hand-coded addresses. > > SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \ > -Wl,--build-id -Wl,--hash-style=both > $(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE > $(call if_changed,vdsold) > >-LDFLAGS_vdso-syms.o := -r -R >+LDFLAGS_vdso-syms.o := -r --just-symbols > $(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE > $(call if_changed,ld) > >-- >2.17.1 https://lore.kernel.org/linux-riscv/20200402175354.pzhzhumlqsjk66nu@google.com/ Reviewed-by: Fangrui Song