From mboxrd@z Thu Jan 1 00:00:00 1970 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 A3E377F for ; Mon, 1 Aug 2022 11:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1659353997; bh=ukpOVj7fywYhR//4Lwx/zQHnRpAGRXXiUEyJ/bF1jLk=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=AFxh0lL88VO4a68vgwlsX9uTwCwmVGzGmWbsuGkK4AgZoTVOGg1ljULjvS9OrDK3M KEl33Ee60LYiiRoAZVzEgP7ocwp3WBEn89MtLhAgsI2yAxXtb2EGE4GB4XX3gqafJs eH6K/Z73Tiy2uQD2e6ACbinDYXnnp/BdJ1fuXcrE= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (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 2837466945; Mon, 1 Aug 2022 07:39:55 -0400 (EDT) Message-ID: Subject: Re: [PATCH v4 0/4] LoongArch: Support new relocation types From: Xi Ruoyao To: Youling Tang , Jinyang He Cc: Huacai Chen , loongarch@lists.linux.dev, LKML , WANG Xuerui , Lulu Cheng Date: Mon, 01 Aug 2022 19:39:54 +0800 In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2022-08-01 at 19:28 +0800, Youling Tang wrote: > > Actually, I really hope kernel image is in the XKVRANGE, rather > > than being in XKPRANGE. So that we can limit kernel and modules > > be in 4GB range. I think it will make all work normally. :-( > >=20 >=20 > Assuming that the kernel and modules are limited to 4G, the external > symbols will be accessed through pcrel32, which means that there is no > need to pass the GOT table entry and there is no need for got support We'll still need to modify GCC to use PC-rel for accessing an object in another TU (by default, or an option to control), instead of GOT. Or just add support to GOT relocations here. But anyway it will be much easier as we won't need to handle per-CPU variables specially. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University