Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp67165lqr; Tue, 4 Jun 2024 21:38:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhO3EhsRMNSmkp6hUmJblgC4QKMKL7UB00XtfO3DWDHaO4baUyBGujjHdfibt5yeXc1C8bpLpdI+qMZSL1/fVSyueUP69LBZpecbVtHw== X-Google-Smtp-Source: AGHT+IHeukk0pV5tadBXml3ZbA2ue6rsflL3HaRHnLPKuWfAdw893OLKaeirc9xLYd3ggQBjDZsX X-Received: by 2002:a05:622a:2989:b0:440:25e8:15d7 with SMTP id d75a77b69052e-44025e818b7mr46726701cf.6.1717562306557; Tue, 04 Jun 2024 21:38:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717562306; cv=pass; d=google.com; s=arc-20160816; b=oEL6V34tlaEpIlyoTTlP12EUaDH4aG0enns5awxcZCNusdLEq/rI9KjzIekhMU5EMc w/5XFuCuZWd+QW+cwSQ+C7Lmm/ka8MTIFujNX1i+RGZpzyB4QQJ9aRTygJNJYwgga9SZ gJN/ly0iHVSvjhwrBYwGnrOE/Erd4XjCo6HjfMJceG4NBds2I9Imj6DGIfCdOcIy7tPM 2fyrLZRfyg7mJLdeKPD52/LszP4bNT6FVvUEcBPKuz/gA0gXahHxBQq5YHwSdYdSv0kk HduKIgiMl++r+ADRvP501/Rs8N2PXyQIVlKV9Iz0U7nQJrasT/h2ZHRaQoAzQUWN63LA dsTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=fK6/hOpWoSyYujUHI/gyvQrVc7Fquhs4s3DYtsbYYDY=; fh=aGZkTyAipHB0AvkddmlI3gR5xj6rQ6kH9uhpSE8q2l4=; b=Chh8YlMPaRqURhncmG1t/TBDOTJ+7fF9Hib6b1CFav60hch1iy3SiqCAHaAEAb/LX6 30vFICSJ9AH9WpGvsyXrVyuhI4DvTaNJ+Pjzl6rhB8I/ymXYAznysWfMa2FnzEligps5 NrW4xYlfON+NHb/ACr050Rjr0ydaO8ZepEqHGJTDKWNSmNue3OHKS82GjxNvolt0N1Wb F45Hor7LboIYmuTCON1LfUcD4tKQJfskO2SP5AxNPJLKd2OxpeeUx8UBh64KvoukEHMT eoPbAbSS8hUE7lzw/gOfgkZvNed4XQP5s+ySk9Rnbxz9FeZMf90JnXYdPhblhVzlg1J6 IkAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=lLF9US43; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-201749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201749-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff259d20bsi118135271cf.649.2024.06.04.21.38.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 21:38:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=lLF9US43; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-201749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201749-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 446911C2270B for ; Wed, 5 Jun 2024 04:38:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 836FC12F373; Wed, 5 Jun 2024 04:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="lLF9US43" Received: from xry111.site (xry111.site [89.208.246.23]) (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 72C8663B for ; Wed, 5 Jun 2024 04:38:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717562299; cv=none; b=XaEROXq+pr2egx9kDg77MqhDDYqPLajCZsarukU0k10IBQ25PbAzMr7Xz8bh6HdBNJelK5UI3DmMYDSu32NHdai/sgmkrOFRImWr6a7glEobad5fSZCKA8O2/wTcFwtCbW+5cH28j2DIBhpfHhI7ZvgRSMhbMnjhADJn33ClEnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717562299; c=relaxed/simple; bh=Cg3KFkgg0IOfj7ddIb/8BLHSkMNVj+t8SMEFfpN9xSo=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=e2+ezYlCbCgpKAEiYdbP/ytnAxSpP45mgIPs4yKR/e82w95j3XFGO3XFNbIyu7XPk2qSV9Qj2oi1XBH729Rvo82hOULxxHIQR8iotuNRBFCYeh0vvmcwJHyHs8fiBTjv93Yi7PIo1VVvyhmcZq6sZ7e/d7a0qRYlQmkQ5xjSNhA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=lLF9US43; arc=none smtp.client-ip=89.208.246.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1717562296; bh=Cg3KFkgg0IOfj7ddIb/8BLHSkMNVj+t8SMEFfpN9xSo=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=lLF9US43fGzsWKCKi2derrneysNWJHXUzil7jf7k3wR19Jh6BFhqX1sJkglC9byhd kog37QTcTxO6+SJiE28UCAfgwKdt/iuNKziV+jwMrCWv2dOacARrF/R0Mrz+2aOZsz QnG2mYB+n2uzm+tz49E1cJWh24YNrC7ac6Y+vkdQ= Received: from [IPv6:240e:358:111d:4300:dc73:854d:832e:6] (unknown [IPv6:240e:358:111d:4300:dc73:854d:832e:6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 0793666A81; Wed, 5 Jun 2024 00:38:07 -0400 (EDT) Message-ID: <80c92f7d283444e493ba1236cf228a5deca6c32d.camel@xry111.site> Subject: Re: [PATCH] loongarch: Only select HAVE_OBJTOOL and allow ORC unwinder if the inline assembler supports R_LARCH_{32,64}_PCREL From: Xi Ruoyao To: Huacai Chen Cc: WANG Xuerui , Tiezhu Yang , Nathan Chancellor , 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 Date: Wed, 05 Jun 2024 12:38:03 +0800 In-Reply-To: References: <20240604150741.30252-1-xry111@xry111.site> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2024-06-05 at 09:52 +0800, Huacai Chen wrote: > Hi, Ruoyao, >=20 > On Tue, Jun 4, 2024 at 11:08=E2=80=AFPM Xi Ruoyao wr= ote: > >=20 > > GAS <=3D 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. > >=20 > > For GAS we can check if -mthin-add-sub option is available to know if > > R_LARCH_{32,64}_PCREL are supported. > I think we should give a chance to toolchains without the > -mthin-add-sub option, so I hope Tiezhu can resubmit this patch to > solve this problem. > https://lore.kernel.org/loongarch/1690272910-11869-6-git-send-email-yangt= iezhu@loongson.cn/ It only handles .discard.{un,}reachable but not __jump_table.=20 __jump_table is our main issue here. And I don't see a quick way to make -mno-thin-add-sub work for __jump_table because we really need to resolve the relocation for __jump_table instead of simply skipping it. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University