Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1386329rwe; Sat, 27 Aug 2022 07:05:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5K0KoD/MVZ0Th9sC0kQXV0m6BzmLKPyNIFlSAtWYxD8t/GZlJOB9Wg/vfnmFQxcpVdKhpm X-Received: by 2002:a17:902:b086:b0:173:f3f:4a85 with SMTP id p6-20020a170902b08600b001730f3f4a85mr8298352plr.116.1661609106415; Sat, 27 Aug 2022 07:05:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661609106; cv=none; d=google.com; s=arc-20160816; b=EuY6m4oYM839lzDPp2d+dmdojIX/GZ5qGX3gR9G3S/2+X4plX/X6GzI+JxA5r6GvfX OHe6W2sar316/cCIuleR3/NGY9tf3LEIRoOaiqxjUPRJ/ZaysPuRqN9VFsfwgIUujl+M YuN1TTzWLOoAlnIW9uRwgjo8DQBs8FBDsGr42YDOsCd9A6P+IS/QfxFW8t7r0xcpm8RY 77+HM9uG/f2gtBnZUFpCL6KCGDWV0P810OmNLRRSUzFDoGSdu3ODG4QBPt1Xbavqbhku N4IiksIXXaeN2zAXwMNZi5jPVBWD9QZOcM5RhNMWIp5TaWXxv9EnFqprN/Or/4SNYggI h9Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=T45fFmb7zETMaCwr8RKLfJ8eZVX3s60ySGTr7lojW9s=; b=HhTTC7Z+ZzCv2UFqhs5ojKQ3zf2+cTVYFLxtAJjBzSUHIltc7Ejyr61v13M/3yMckr bkHv8I5jJITtpcyDFSNQyKlVLuCRhUnx+75upMlpSKRhodBIpA5b8PHR+w7DzOCsWUlH 3AE01baLF0hR5bJHEknqgHOAtW120AgctclhuPUFRLLsMJVs7ynDLseX+YM7VE/Qgjzj 5SsEEN1jiiOvssPeErEbHT/r/xgvclCAqwiZ3mgN4iEvHnt1Xogi2hGQYkZie3iesrUO jIoU7rBuaoZiLP+kj95FmvbGZ8xfugOjFhXDFcqf0LxZDdtWoVqnATCJXKx7W4cEeGbX fs9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LF72oNzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a056a00170600b0052d939cdf27si5062976pfc.232.2022.08.27.07.04.53; Sat, 27 Aug 2022 07:05:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LF72oNzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233058AbiH0NUp (ORCPT + 99 others); Sat, 27 Aug 2022 09:20:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232402AbiH0NUn (ORCPT ); Sat, 27 Aug 2022 09:20:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7C8E72694 for ; Sat, 27 Aug 2022 06:20:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 64064B80064 for ; Sat, 27 Aug 2022 13:20:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BFAFC43470 for ; Sat, 27 Aug 2022 13:20:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661606439; bh=hKEJAHcB/rJhF09vDlSJwQNMA44doH2+KJ3mvkEZjGY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LF72oNzEehDioAHCbCHWMbz+98dUYAiwMDs3m/b7IGrOooshPfuiZNIt9a/9qZ5/C x2hnaybjjbHqaaV985ZKHlWu4rcRKBWsexp6bGkVqceKpaIkYoNnGfhFQeGu2O9gd/ fGh+k9YYyWGr1muJdtRx6QQriuGXOIJG7piH1Cy3nh4gjZd/Wg8F8vc31w8CORK/OB Xe+rvmWlTztiRjI2It8+ZU8smCL9qaG+P+mt72Tmxi2An++6Il7ledjIRMSPEUV0nw pUFOSatwuZmVwFIx4mtOuH3apzF/srsCmMxjpW+QWND570Xwm4Sv/eYstE2JbOj3Sr 06QToKffS4YfQ== Received: by mail-vs1-f41.google.com with SMTP id w188so4129692vsb.10 for ; Sat, 27 Aug 2022 06:20:39 -0700 (PDT) X-Gm-Message-State: ACgBeo0GepYrhogYsZZIkO2r54/mpH0Lc0E7n/imC4H5+/l1XlivKw64 Ng7l5hNsl+TPUymdCfUSk8G3b23TnX9YmCVTyrI= X-Received: by 2002:a05:6102:3a70:b0:390:81fc:3f39 with SMTP id bf16-20020a0561023a7000b0039081fc3f39mr1278991vsb.84.1661606438058; Sat, 27 Aug 2022 06:20:38 -0700 (PDT) MIME-Version: 1.0 References: <32a74a218c76611f897fd1df1ad0059068621133.camel@xry111.site> <0179679b736aea7258981dec2d83107cce74dfc1.camel@xry111.site> <6b5d2188f93ed72b67a4bbb7116113f833fe1ee5.camel@xry111.site> <7cad6e78014168a8906e130e1cf3809077d2bda7.camel@xry111.site> <1d0783b87bda3e454a111862fcc5b5faffcb16b0.camel@xry111.site> <00eede4b1380888a500f74b1e818bb25a550632b.camel@xry111.site> <7512ae16-b171-d072-674f-a6b9a5e764d6@loongson.cn> <10751c9af5d45fea741e0bbed6c818ddb9db3ac3.camel@xry111.site> <7b1f9813-85fc-acfd-8e24-7e01469ded3a@loongson.cn> <3c724516-50eb-cd34-5e4f-399c53a89ee4@loongson.cn> <98efbf76-fbf3-f90b-82d4-bd2874088d05@loongson.cn> <8fd0864c3f7f3ca53db4c663215f757993ee1596.camel@xry111.site> In-Reply-To: <8fd0864c3f7f3ca53db4c663215f757993ee1596.camel@xry111.site> From: Huacai Chen Date: Sat, 27 Aug 2022 21:20:24 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 0/4] LoongArch: Support new relocation types To: Xi Ruoyao , Arnd Bergmann Cc: Lulu Cheng , Youling Tang , Jinyang He , loongarch@lists.linux.dev, LKML , WANG Xuerui Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Arnd, Could you please update the cross-compilers here [1] with the current snapshot of binutils and gcc? Or we can only do that until new binutils/gcc be released? New relocation types will be supported in binutils-2.40 and gcc-13 but they will be released after kernel-6.1. If possible, we want to make this series be upstream in the 6.1 cycle and remove the old relocation types support at the same time (This means we cannot use old toolchain to build new kernels). Since 5.19 and 6.0 are un-bootable on LoongArch, this will break nothing but make life easier by reducing maintenance cost. [1] https://mirrors.edge.kernel.org/pub/tools/crosstool/ Huacai On Tue, Aug 2, 2022 at 3:15 PM Xi Ruoyao wrote: > > On Tue, 2022-08-02 at 14:39 +0800, Lulu Cheng wrote: > > > > > > > OO, old toolchains require extra handlingg no matter how modified. > > > Maybe rejecting old toolchain builds is a good option as Huacai > > > said. > > > Sorry to ask, is it possible to use an absolute address to visit here? > > Like precpu, do not use pcrel or got, and it directly uses > > four instructions to obtain the absolute address. > > The same is achieved by adding attributes in GCC. > > Both GOT and ABS will work. But to me GOT is better because it only > needs two instructions while ABS needs four. > > The most troubling issue is how to support the old GCC. It seems we > have to check GCC version and use -Wa,-mla-local-with-pcrel for GCC 12 > (while I still think GOT is better but we don't have -mla-local-with- > got, *and* it will cause make every local object address load cost 4 > instructions), or we just say "it's impossible to use GCC 12 to build > Linux 6.0 for LoongArch". > > -- > Xi Ruoyao > School of Aerospace Science and Technology, Xidian University