Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1245773lfc; Wed, 1 Jun 2022 12:57:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytLfCTngt5zm0U61piGZQmcPfOvXjFfuojUphZthzTTmbrvdTYwwp/oIYeC1G1wbSdebAy X-Received: by 2002:a05:6a00:2402:b0:4e1:3df2:5373 with SMTP id z2-20020a056a00240200b004e13df25373mr67964328pfh.40.1654113461407; Wed, 01 Jun 2022 12:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654113461; cv=none; d=google.com; s=arc-20160816; b=tboQQmVYOoYqM9ka5qYA+6uxJL5hj5qIIXOY8ArS0FUwbUDZFVgG3rL1XUnkstrScX I7Z/lwjwY0rJiyfo3CwlImezfxyzN2BPgEdgw/GVnyfv+MO4Awp5vIskO634pa3eXrWX /uh1FCsPWV5BSHVuiuzDRvp29izSuCX4W8Ejn2KautAuaDkQVYYiW898v6v7EA8Gmcmq Nzpast+VB0RL7WxRsPe39TXs5VqEdxoJ341foD4ihouFQd/B11dlsqqx3t1m2jnzXlFU yxu+NGzFuNQD4YTciPqKOZvB7MKa/CaIst4JFjTuNvsHTZOpmEXpfmms3Egn0E0dp1Ri uwxg== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tTMeQSlVN/jki7gY30nXBiHUEabl86oFmR3MDB8WTos=; b=jJNNS316lIUDEL7OrsDTORk7PJbkYxbrPiENpTBuHqzZ5w9dG7s4Gq0QIZwlgrNsjB fuU1R3vp7nmg0hwhbobByhbmm8pZ0+LHbSfN7g6hDTacUCx1E0WkSExEiPsn5Xj2PcLn poaVecIR49WtADBuqC82+w8XUFvZ5SbYVCppnJ8ptW78iXyaPIuHIug0YMGPKEUdMo4e A+JSqurX9veP6D/NOpyu+Z9ahD3RjLy7ISjWTrln3awfvSA9iHOVjFXBWMZE2G7t1/OP MMg0u9f5KwkJ1B/1TBmQH+fp9w5d43lLnGbLQfBA9dQQaUtwKj9MtRagQJpiFZBf4Bny ky8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kyiJeT+H; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z33-20020a631921000000b003fc68a8b1d9si3105913pgl.870.2022.06.01.12.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:57:41 -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; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kyiJeT+H; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F07AC14C74E; Wed, 1 Jun 2022 12:17:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355994AbiFAQId (ORCPT + 99 others); Wed, 1 Jun 2022 12:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355979AbiFAQIb (ORCPT ); Wed, 1 Jun 2022 12:08:31 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C165F59309; Wed, 1 Jun 2022 09:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=tTMeQSlVN/jki7gY30nXBiHUEabl86oFmR3MDB8WTos=; b=kyiJeT+HyMH3qWkHr4M/GNDhVQ he0vs1nHlDJumZTaCqAhyI7XGiLhP5COE+01Z7IJa+HwSy366FQWqStsxj1JqUM1nOswZsj7WWVeI 4udEx97HSIXoUBnAgUA5MwNAseseUtVRx+w2cAKqZa+5neeh9UoFA37oFcXJs1Wo4h9wKKPB9KJo1 t/Fdq7UooJyG1DN1qOm11lM0GpIH1WuWScjUsUQD6R24cKP2YYp0H/jsz0B1tliYLhv2pX0u2dcpG bB5mNALQC3eacnn7udZ6FPO5djIC58FGvpGACjmtP0Qe6JVqooWssI7hS0A8MX+pqK2iEoAbhqdoi VUq+pJaA==; Received: from [2601:1c0:6280:3f0::aa0b] by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwQtS-003pQZ-7K; Wed, 01 Jun 2022 16:08:23 +0000 Message-ID: Date: Wed, 1 Jun 2022 09:08:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] RISCV: kexec: Fix build error without CONFIG_MODULES Content-Language: en-US To: Li Zhengyu , palmer@rivosinc.com Cc: paul.walmsley@sifive.com, aou@eecs.berkeley.edu, liaochang1@huawei.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-next@vger.kernel.org References: <20220601063924.13037-1-lizhengyu3@huawei.com> From: Randy Dunlap In-Reply-To: <20220601063924.13037-1-lizhengyu3@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 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? 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 */ -- ~Randy