Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1943283imn; Mon, 1 Aug 2022 05:54:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Dr6ZnrFA0mS6J9YN3Op8As+Hblo/l8BVNey3Oa/mC6VYPRNm4gHDcvkEiUHRsSbFXQlAZ X-Received: by 2002:a17:90a:f490:b0:1f3:139e:a487 with SMTP id bx16-20020a17090af49000b001f3139ea487mr19758303pjb.91.1659358488303; Mon, 01 Aug 2022 05:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659358488; cv=none; d=google.com; s=arc-20160816; b=c40oyWcVuNdYcrStX67+lmz86rkdpYdd8xe58h4jyaZlWcrbZ3auGYkF5OhtpO9PZe QI66uRExSu7LYry5Bd2AyT7g65K89Z24DZLlvdc0/ZynhLk5ZHTUCdKe0oRsOPmnnpTZ //PzzDn/qBROt2JllKlfzuIeV8igrkqjHSwScetrdbSEqrySTwxD7XMJl7+AbJmLyz9f sAhmDjHwBesHh8e6D+V17efs/FX10dzhgNIk/hT0HwWgBQz5oPpFn1au10szPjZMUOkI IWjuz42x1zcjoXotLsbyE08gS1cCrlXNfAh0kNAJmCFXhTrxCvFVEbsMx6LM1k23pCzY IR5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=chq/cxsK0jcRkhj8oiz/G8Huln7hZp3Iq+uQBf9cpoQ=; b=HjCF0uUR7/3pq8fYlmESE3hETFNlA1seoo8zAcsGpeOtkomrwntsf8XuhJVfah7EqD 4iTOrlnzGXPwoNWqjItM2x+NBHehxtMPg4YwIQlbMLJ0V6U/PC/sfBzLwirv0qi1Vk6f 42pBkuZNMGo7kAu6KFccLcxpBshQZ7iI3eHR0yHs6/92O6+8lE1G9LTtqibRG/slma1F /YCGyEFCtT1dZPAchQAuZF1YpsQ0GkhCzChCi2o6YdopDMTNwK2edR+xemiFvbzoc3wc OGee8oCO7PKnUnPRqDSfvYXnih1OaF2a0ROZaI7VfC/qQofh/j34XhnOP7qu5K6dI0zu /j2g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a38-20020a056a001d2600b0052d7483e126si3204538pfx.292.2022.08.01.05.54.32; Mon, 01 Aug 2022 05:54:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233436AbiHAMeN (ORCPT + 99 others); Mon, 1 Aug 2022 08:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231824AbiHAMdy (ORCPT ); Mon, 1 Aug 2022 08:33:54 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 924799966F for ; Mon, 1 Aug 2022 05:13:45 -0700 (PDT) Received: from [10.130.0.193] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxgM93w+diTDQAAA--.1318S3; Mon, 01 Aug 2022 20:13:43 +0800 (CST) Subject: Re: [PATCH v4 0/4] LoongArch: Support new relocation types To: Xi Ruoyao , Huacai Chen 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> Cc: Jinyang He , loongarch@lists.linux.dev, LKML , WANG Xuerui , Lulu Cheng From: Youling Tang Message-ID: <3c724516-50eb-cd34-5e4f-399c53a89ee4@loongson.cn> Date: Mon, 1 Aug 2022 20:13:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf9DxgM93w+diTDQAAA--.1318S3 X-Coremail-Antispam: 1UD129KBjvdXoWrZFWfury3ZryDKrWxZryrZwb_yoWfuwbE9a 4kuF4kGr48Ars0yF45tr1xZFZ7GFyYyryjyr4qga13Z3s3Xa1kGr1q93WFvF13GFWDXr1f CrnIvw4ktr12vjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbskFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s 1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0 cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8Jw ACjcxG0xvEwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc7I2V7IY0VAS07AlzVAYIcxG 8wCY02Avz4vE14v_Xr1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2 IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v2 6r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2 IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E 87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73Uj IFyTuYvjfUeWlkDUUUU X-CM-SenderInfo: 5wdqw5prxox03j6o00pqjv00gofq/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS 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 On 08/01/2022 07:39 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. > OO, old toolchains require extra handlingg no matter how modified. Maybe rejecting old toolchain builds is a good option as Huacai said. Youling.