From mboxrd@z Thu Jan 1 00:00:00 1970 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 5092C7F for ; Mon, 1 Aug 2022 12:09:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F036FC433B5 for ; Mon, 1 Aug 2022 12:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659355793; bh=Dj1WIaCLQ5ggZ5YYu7kWg3EE1ARgkRRqTx0wUE79N1Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=c+VOQW+SUaPWZGfEtTnRKM9wkL7ZL5NmiF2/xp8QvARdIFIZA7xwhjCd9KsNpnlEj glohiSMODaiuT6YFBP0kBCMI91LXKRzivrvXau/VHLn8Da5Z0sZDaLJM2uZ3IGx9qE zvnkh1t//1KWbMJJNR86u7OBTD8eDZcB3ykxbBJQMeGBTX7xUxZQR3qIZMXHMlXOTx LmGPLDG67Mmv9DS5j9Sp9MmxixLjWXf3lXIe6ccFUe/MVy+JF93yJ5bucIVvY+1kPL o4cgqpzQWljJQFPmDCoc9xN+dfuKgoN4+qwd134qr3fZjmtGq6uTRwXRnuzy28gbsx WqnonsX1TDiug== Received: by mail-vs1-f51.google.com with SMTP id s129so2569587vsb.11 for ; Mon, 01 Aug 2022 05:09:52 -0700 (PDT) X-Gm-Message-State: AJIora+4x+VrioG5uZbdVioa6xvqsW51bqUqbIaCyWWMCyox4U9oo0V0 AGej5QoiYdVjn/rU2HBPiH+OiT+xiIT/SfiSSBg= X-Google-Smtp-Source: AGRyM1s0etQ9Pvllk/JiNzbTQ6QGqNTG4QGA7PokgrtQugX90IoTP+3B3Ap08D0LMddUwtf24xueuWULWjo15yBKjXY= X-Received: by 2002:a05:6102:dd4:b0:358:62b5:20a6 with SMTP id e20-20020a0561020dd400b0035862b520a6mr5613984vst.84.1659355791817; Mon, 01 Aug 2022 05:09:51 -0700 (PDT) Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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> In-Reply-To: From: Huacai Chen Date: Mon, 1 Aug 2022 20:09:39 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 0/4] LoongArch: Support new relocation types To: Xi Ruoyao Cc: Youling Tang , Jinyang He , loongarch@lists.linux.dev, LKML , WANG Xuerui , Lulu Cheng Content-Type: text/plain; charset="UTF-8" Hi, Ruoyao, On Mon, Aug 1, 2022 at 7:40 PM Xi Ruoyao wrote: > > 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. :-( > > > > > > > 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. All tlb-mapped kernel may be supported in future, but no now. Because there are a ton of problems. :) Huacai > -- > Xi Ruoyao > School of Aerospace Science and Technology, Xidian University