Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5996404ioo; Wed, 1 Jun 2022 18:06:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoc97q/4ZtK9gHxL/ORSfuoEb0jsBcYrGv6rnxy0BlIxw1nMxYFd8LAJtNkl7uKDdMb57r X-Received: by 2002:a17:90b:3696:b0:1e6:6f6d:962b with SMTP id mj22-20020a17090b369600b001e66f6d962bmr4119591pjb.8.1654132018970; Wed, 01 Jun 2022 18:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654132018; cv=none; d=google.com; s=arc-20160816; b=raKHBByGWArgEwy8xZE9oRcbncXcSBfit7X/4rQYG/kUSUK1Xb1gI6HUmcU1YqRgWT cZbx0yFcNekWA8ItdJujyrS30wkCwvWqewydiIgnVpVG0Dp9g9czQ75GmdTPCTLjPU7H Yr52lnc+qN220h+nG9nkJu0Zw2g5OGEYutEVyBsjvEWY10D/RbTuNzqyqAe4teg2vzYa HSUarH+UBnwRHbgPZ0fvF8icxEVegBjC46Y8zWO1iWGFAQWcLMWZ1bMXGgeOJQj6MWcQ 1nSe0DIvGbSQ7zl0oZtl8U0qAoEWjNaQ+27hLY/ZjsgQ/GuXFSS3a7pQam4nB2kr4VkA wlbQ== 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:references:cc:to :subject; bh=zD3V4RrJ8XFk+TY3HqmPoCOhbbKZ0TS5NrcfVndZ4iw=; b=FKQJRZGhotxg5Yndj054b3ivrKitQBUsTwv9k8EhMjNSlyfFUuWzZP5XB+L5AwHNRT oIJZGthUmPvsNvFdM/CK4cBWMGPn66wuen5m8Pw02y+eI7pu0259jMhKj5snzc1NvW1T O4E2PKBGztTwbns+QQDRt33H/GdNNC7WD1Agt6VZAduoICBEQ1USsHJDINVdUCHVXwX8 C5rVzXKJah0A9zoISaJz0Nx0aWfbmc/mfHH68XryCY5T8xoZLDzX11TwlL0sU6ZwF15K DG2qjLbuBandkmP4fCO57VQI20+uM+/icFNvo/Dzi/5wnu5yt6fKGwwZ993n91nUn0Wr 0y2A== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i5-20020aa78b45000000b00518be006107si3842494pfd.116.2022.06.01.18.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 18:06:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4B44925BC22; Wed, 1 Jun 2022 18:02:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232932AbiFBBCS (ORCPT + 99 others); Wed, 1 Jun 2022 21:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232915AbiFBBCP (ORCPT ); Wed, 1 Jun 2022 21:02:15 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 656B4258DC9; Wed, 1 Jun 2022 18:02:13 -0700 (PDT) Received: from kwepemi500014.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LD74C5FsSzjWwG; Thu, 2 Jun 2022 09:00:59 +0800 (CST) Received: from [10.67.111.227] (10.67.111.227) by kwepemi500014.china.huawei.com (7.221.188.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 2 Jun 2022 09:02:10 +0800 Subject: Re: [PATCH] RISCV: kexec: Fix build error without CONFIG_MODULES To: Randy Dunlap , CC: , , , , , , , References: <20220601063924.13037-1-lizhengyu3@huawei.com> From: "lizhengyu (E)" Message-ID: Date: Thu, 2 Jun 2022 09:02:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.111.227] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500014.china.huawei.com (7.221.188.232) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Wed, 01 Jun 2022 09:08:16 -0700, Randy Dunlap wrote: > Hi-- > > On 5/31/22 23:39, Li Zhengyu wrote: >> When CONFIG_MODULES is not set/enabled: >> >> ../arch/riscv/kernel/elf_kexec.c:353:9: error: unknown type name 'Elf_Rela'; did you mean 'Elf64_Rela'? >> 353 | Elf_Rela *relas; >> | ^~~~~~~~ >> | Elf64_Rela >> >> Replace Elf_Rela by Elf64_Rela to avoid relying on CONFIG_MODULES. >> > BTW, does this mean that RISC-V kexec is only available on 64BIT > and not on 32BIT? Currently, yes, CONFIG_KEXEC_FILE depends on 64BIT. Palmer is working on it, see https://lore.kernel.org/all/20220520154430.18593-1-palmer@rivosinc.com/ . > > thanks. > >> Signed-off-by: Li Zhengyu >> --- >> arch/riscv/kernel/elf_kexec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/riscv/kernel/elf_kexec.c b/arch/riscv/kernel/elf_kexec.c >> index 9cb85095fd45..0cb94992c15b 100644 >> --- a/arch/riscv/kernel/elf_kexec.c >> +++ b/arch/riscv/kernel/elf_kexec.c >> @@ -349,7 +349,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi, >> { >> const char *strtab, *name, *shstrtab; >> const Elf_Shdr *sechdrs; >> - Elf_Rela *relas; >> + Elf64_Rela *relas; >> int i, r_type; >> >> /* String & section header string table */