Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5468191ioo; Wed, 1 Jun 2022 06:16:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXUgzXVntBL+xIu9Q/ym1L8nzgqB7x/5cNfA3YBPPu2v1+JGHGKaklCsCB0IKjObJ/5PJ4 X-Received: by 2002:a17:907:a40b:b0:6ff:6c9f:7050 with SMTP id sg11-20020a170907a40b00b006ff6c9f7050mr15899084ejc.713.1654089362297; Wed, 01 Jun 2022 06:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654089362; cv=none; d=google.com; s=arc-20160816; b=CPbFacWVOImjS/NnEGOff8Jj1GEMvBWGVB2nXcxHttOOUaXFXnlD3RLXTqI2jNa5Nz LNfVNdKNjCePXQAkFW9K1GJ83cS6Lolu8e7Pkapl5mjOd2vLSLGMv0ZwN/2599RaWZgm 63QRxbLUgQ6IE63J7KYjfXBaYEC20PWDHlJG9wobgdwRNTh/W6P2C3yJpsA1TvQxEE3Y kWQE93BwMp7hijFbxsNlSIhDdbhsRGS1Fp6lYXVQ/wy7NfWooqaereGXVpr8RjoTSMc1 C9Ly1ChXtLXIebz3Slq3XEBxbeIvIlJ1q4OYpthy08fO8bouVzf4EPmTV9aDdAElGzx1 ojfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=GMYiocZEbLP45HXmFRaDEOrIl3lkM7QVFT3AZhH8FGI=; b=PjoBlkRAr9uHhmjsklKnn/BRYpmEDiDS+hr/9jL6JvIKd+6asjxTw9r3vim9E0t1+h IJbHznUZ3NTtRIXeRv/C1X5Z3Cg4EdSbHMQ5Sc+txXfjPDe7fJPgKefPTb5BABp+GXgf tlD/wv+Y9GqsW1t8isgLg+SSEAtXeOGWcyIaUJaVYyuCn07oa8XeWowq/ZLWpGuyzd/+ cMVr3aFClXpwlmDjKyUuLURMjaImJzKuJC5xXf+pycnM5syvc73GGBouMAnbFHN3LuCw mnGItWuRe6XmaXTCzoDXkpQjSxrFJIRO8a9mCPLQ4/liEHjLV2jRQfPskKjgSC1Hmekp Cknw== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a056402358900b0042e00b6cb44si558457edc.476.2022.06.01.06.15.33; Wed, 01 Jun 2022 06:16:02 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244961AbiFAGlN (ORCPT + 99 others); Wed, 1 Jun 2022 02:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234619AbiFAGlM (ORCPT ); Wed, 1 Jun 2022 02:41:12 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B818954B0; Tue, 31 May 2022 23:41:11 -0700 (PDT) Received: from kwepemi500014.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LCffC34bpzjX9f; Wed, 1 Jun 2022 14:40:19 +0800 (CST) Received: from huawei.com (10.67.174.157) 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; Wed, 1 Jun 2022 14:41:09 +0800 From: Li Zhengyu To: , CC: , , , , , , , Subject: [PATCH] RISCV: kexec: Fix build error without CONFIG_MODULES Date: Wed, 1 Jun 2022 14:39:24 +0800 Message-ID: <20220601063924.13037-1-lizhengyu3@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.157] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500014.china.huawei.com (7.221.188.232) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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. 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 */ -- 2.17.1