Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp87651lqr; Tue, 4 Jun 2024 22:43:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2uJNIxy2uTqyRHAQNHnTi5cEFHMpy9/l2lffGHho9Yd8R3kceaSVghRixt46/BEuPy/zduJZlBC2rQWp19S2lIQywqjDGkls3acFcaA== X-Google-Smtp-Source: AGHT+IGTjzdY0woHIUeh/TxJ0L+52gQcuOrsmiADOaHgZtWQ2wim1fKjWV+OEcQPMgDKFPbOUegq X-Received: by 2002:ac2:5495:0:b0:529:b6c3:be9e with SMTP id 2adb3069b0e04-52bab4ca560mr1039770e87.9.1717566218652; Tue, 04 Jun 2024 22:43:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717566218; cv=pass; d=google.com; s=arc-20160816; b=acRIMhRy6LzSSXDyhtRSOWnNEOo9XgUWqJGduSeC8+QUlrXR/AAXF8OqWEzXSuT3R+ Ov71/87/3R6GDK8Heu5SH4xUI7f2zZ45C0f8ioBkegZeKM6Sb6l+WNTO0z3r1Hkn9oNC kNDBDm8dc6uKdFvamnH8hikOumGI+xZS0aYDjQYI4zVl0Rn929XgkoNLC+AyN3wHmo1e sH9tBxSYgEWllePlOmpnyMFRQQk1PJy64bF9cwP4v4qbxby+6nozHjXAujIxhfm6qMu1 9EtcbtqxeRmIYu50WosygTgo7xqTYpGkiFWH/Z6c8pQgXuLgUMCYHEPc1Y0MuCGFB0zG ohXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AvzU0wRU9rP6CN1mnQ9XrRxWnDGV4DYyGI0bQdBUDJ0=; fh=HHyrrIJEEtY3sMwB7YODdVq0bjrdbdKKtixYlVVW7A4=; b=qCia2n4lfuIXFkjc8HqS1cmW+68mFEHJA7EQBTqDvzzVKkTBBlCPc0QwHLDcG4tFH/ Kzhb6FoouA2x2NeiHbCpycNJroCE+1s/3faNXqlXbES+Uq4uM2z9Gg+qhq4hFhYh7Qcc qQjw6ZGB9yMIX3FLVP0SgNEUNTMW+fVHzSbh95sxwGinzE4sfo/7rwI+nKves+eUHJMY XyGHa0Nd0v3s6Z1AA/rYDLPyX4tGUvix6Pcc3VhSMP138aPL8xKVGno2Y/p8GRL7/Uf0 q8QKVD1OSHKSIlJdsoHRr0z0KngYYpTSBKq5x66+4UoLU8Fnj9w1aRDu+FJJ59yld8Ge l4Bw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OUfICDbx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a69049bf805si283380766b.888.2024.06.04.22.43.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 22:43:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OUfICDbx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4C01F1F24766 for ; Wed, 5 Jun 2024 05:43:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5AE2169390; Wed, 5 Jun 2024 05:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OUfICDbx" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E144A2941B; Wed, 5 Jun 2024 05:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717566212; cv=none; b=DaJpcw0w2ShZVvMMeGxutHMn47wQzjISUvnkqx1WsODFK9K0QTugJImq86TUEHbCqRn5APd53RHUdU0jQg+FnCw/Q3wuMFe17u2HnLSVrTu6+LrLijv3pvvF3xgM9UlFmJm4XzEeQwRI7WLu20NGbOU/ma4dvOhT7UIOwCwxHeA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717566212; c=relaxed/simple; bh=dtX8g48MWq+k12U7A9BZ9A3hLXeoqnuptOtFwcRXT6U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ltY+nv1/Y7LvoN9jKkAakNibZ01Gq1m9kf/1oXDlj5AwOKUyHlSdhkgeeNFmtz5OXv9eb5nn/PwbjblMGtRhIeCLzmD7srL6mk00JOautXwgsys01YGHuTpSGsCj7ZF3rgLMeZvgI1Zc6VvlVaujP9F7nla1K+UCkjHSKFXajv8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OUfICDbx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4184FC32781; Wed, 5 Jun 2024 05:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717566211; bh=dtX8g48MWq+k12U7A9BZ9A3hLXeoqnuptOtFwcRXT6U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OUfICDbxSMPfhIg2kmdAwBk1CHPhpsculazhaKZoVMAv2CgV8lTH0Bq2HTUUG6q6s AahgCYeqzzXtPBTMmyuO5QePPEn6iNIh3Udg4VxK8k6QDawoYtxWj9Oc/KSRlPNZa2 FFeN8oOumPN15S8/BkppG830Jlk0E/uqaJmhmFZOygOi9WVufuumMTgWorITSz7Xpb 6z5YfGspWfKsamln5VOr6axbMSVhOG/8S1C8ZH9OVv3lE7/OWQLOP+OpiN+3tsF6ME hIKgJLwubMQS6qPVxAHrl8r+txckmkBqQpOD7jQmW36DzSqyvN5XzfYbUJE/hmVV/X 923v5iGU/B+wg== Date: Tue, 4 Jun 2024 22:43:28 -0700 From: Nathan Chancellor To: Xi Ruoyao Cc: Huacai Chen , WANG Xuerui , Tiezhu Yang , Nick Desaulniers , Bill Wendling , Justin Stitt , Youling Tang , Jinyang He , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, mengqinggang@loongson.cn, cailulu@loongson.cn, wanglei@loongson.cn, luweining@loongson.cn, Yujie Liu , Heng Qi , Tejun Heo Subject: Re: [PATCH] loongarch: Only select HAVE_OBJTOOL and allow ORC unwinder if the inline assembler supports R_LARCH_{32,64}_PCREL Message-ID: <20240605054328.GA279426@thelio-3990X> References: <20240604150741.30252-1-xry111@xry111.site> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240604150741.30252-1-xry111@xry111.site> On Tue, Jun 04, 2024 at 11:07:41PM +0800, Xi Ruoyao wrote: > GAS <= 2.41 does not support generating R_LARCH_{32,64}_PCREL for > "label - ." and it generates R_LARCH_{ADD,SUB}{32,64} pairs instead. > objtool cannot handle R_LARCH_{ADD,SUB}{32,64} pair in __jump_table > (static key implementation) and etc. so it will produce some warnings. > This is causing the kernel CI systems to complain everywhere. > > For GAS we can check if -mthin-add-sub option is available to know if > R_LARCH_{32,64}_PCREL are supported. > > For Clang, we require Clang >= 18 and Clang >= 17 already supports > R_LARCH_{32,64}_PCREL, so we can always assume Clang is fine for > objtool. For what it's worth, I have noticed some warnings with clang that I don't see with GCC but I only filed an issue on our GitHub and never followed up on the mailing list, so sorry about that. https://github.com/ClangBuiltLinux/linux/issues/2024 Might be tangential to this patch though but I felt it was worth mentioning. Cheers, Nathan