Message ID | 20230627163205.2082246-1-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8336724vqr; Tue, 27 Jun 2023 09:52:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5M4iY5zppm+7KDv6yPZn0cEa3majjp6RWJgTIiCE72u7D2Q8NuE3bt8XnzdID380LbMPoK X-Received: by 2002:a17:90a:3886:b0:25e:cdbe:7a74 with SMTP id x6-20020a17090a388600b0025ecdbe7a74mr28027467pjb.18.1687884745383; Tue, 27 Jun 2023 09:52:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687884745; cv=none; d=google.com; s=arc-20160816; b=YvFLjClTQBKAc3FCojzB5/cdXkk65w8juETs27TZuSGRb3E4nguQCkI2D7IxvUZfa/ mc5D/tgnqMBNs7Gtvcnk/CGc4sSXa+Bb2+krMZvx0cSFmBzmxyzgyjl+myx9QRmvNpUV ah5xlXX+4GKzMdwIN3emeqkkv7bwD/qp4IM9/msL1W7zJkF/GG0HLSLAaqoPFTK+TPEz iFEkWjnuvZxLGhjA6SQdc/XONQUfPawkpOQ1Z1DToINo/Gp13VvdoNuaoBWyAaZIdOmv 6XeoptQ+ftAfZXeFRC/hthvRJwOd2B4IWLCvesvWgyyrl68RrU2X2G79Y8kYXog9yoe6 wetQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GEXq8mEsFDjvgD1K4Zx+qpAs8nQ+VP0obqxSD3x7Dxk=; fh=F2cQe3yUZPpZwzaeyzv8l4p+q7qNQrQd9gRdQGFNyJc=; b=fDvtfO88NtgrRIX7Y4zTJ4qiGC5z99zyxxkDdGKEadrWfiweNAcSkN6gfaQWcO/WE4 UsZELTaNdaPbcPveg6ApXzGKUZy+ScG5hTyz5xjweDZhYEnrPT8Yr+gmCPG09F1ErdwI rpo8IV/7alUOQV4jBA7+Vao65+FWWgB5YKmZU9PTSuUIV5zoHtxCKjRkcpV4p50cbDZ0 0Mdp/c1r+3QlCpEkwFZrTuv0HKc5bGW+LX3+ZIrDFoFtTuRk9xgwvqF9UkGTfkmW+yIu 6EBFaKCPtYOGFec4MPMecsKNaaP6IRfq4+N7Mi5xnhkR0XrLa+aSEWXDfqLAL8dv5Hqh dm0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VqSjMt23; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x91-20020a17090a38e400b0025defcc6e75si7329684pjb.172.2023.06.27.09.52.11; Tue, 27 Jun 2023 09:52:25 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VqSjMt23; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231878AbjF0Qcw (ORCPT <rfc822;nicolai.engesland@gmail.com> + 99 others); Tue, 27 Jun 2023 12:32:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232474AbjF0QcP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 27 Jun 2023 12:32:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F7DB30F1; Tue, 27 Jun 2023 09:32:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 34FAB611DD; Tue, 27 Jun 2023 16:32:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53554C433C8; Tue, 27 Jun 2023 16:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687883531; bh=2XOJKw8mrpi06UFry4/LUM2tzNn7wRfcGUBNgfFSFmI=; h=From:To:Cc:Subject:Date:From; b=VqSjMt23XiELwozolSyczKHov0K7Jjhf10PnhFijN89uhd6LQZUFTqFf/tw814fs4 6YuK7UbYt253RSOE3lxE1cRK4UBw/VK1PM0XENiDn8tts6IK3cQbbKG1OV1Ot1mJWo TtYusktLdpz9/N2zLAtdhfA3KAHUM0ZO+4UYSFt/CMzU8TX11XOlbQONG/RNrlI90u 3P58NqaqyyH9/MLe1mgH52sxlQ1HDdM/OPdnOHt4aSAqGtoEJPiZDIXaf05QiMgAQl VUWWjF52RHicN5LWP55utWNGoTzPTcTylO0vE/Apn7oN9j/u7obGDaG0e53awAhayZ ph33Yz8qCRMXw== From: Masahiro Yamada <masahiroy@kernel.org> To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu> Subject: [PATCH] modpost: define more R_ARM_* for old distributions Date: Wed, 28 Jun 2023 01:32:05 +0900 Message-Id: <20230627163205.2082246-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769875434798736257?= X-GMAIL-MSGID: =?utf-8?q?1769875434798736257?= |
Series |
modpost: define more R_ARM_* for old distributions
|
|
Commit Message
Masahiro Yamada
June 27, 2023, 4:32 p.m. UTC
On CentOS 7, the following build error occurs.
scripts/mod/modpost.c: In function 'addend_arm_rel':
scripts/mod/modpost.c:1312:7: error: 'R_ARM_MOVW_ABS_NC' undeclared (first use in this function); did you mean 'R_ARM_THM_ABS5'?
case R_ARM_MOVW_ABS_NC:
^~~~~~~~~~~~~~~~~
R_ARM_THM_ABS5
scripts/mod/modpost.c:1312:7: note: each undeclared identifier is reported only once for each function it appears in
scripts/mod/modpost.c:1313:7: error: 'R_ARM_MOVT_ABS' undeclared (first use in this function); did you mean 'R_ARM_THM_ABS5'?
case R_ARM_MOVT_ABS:
^~~~~~~~~~~~~~
R_ARM_THM_ABS5
scripts/mod/modpost.c:1326:7: error: 'R_ARM_THM_MOVW_ABS_NC' undeclared (first use in this function); did you mean 'R_ARM_THM_ABS5'?
case R_ARM_THM_MOVW_ABS_NC:
^~~~~~~~~~~~~~~~~~~~~
R_ARM_THM_ABS5
scripts/mod/modpost.c:1327:7: error: 'R_ARM_THM_MOVT_ABS' undeclared (first use in this function); did you mean 'R_ARM_THM_ABS5'?
case R_ARM_THM_MOVT_ABS:
^~~~~~~~~~~~~~~~~~
R_ARM_THM_ABS5
Fixes: 12ca2c67d742 ("modpost: detect section mismatch for R_ARM_{MOVW_ABS_NC,MOVT_ABS}")
Fixes: cd1824fb7a37 ("modpost: detect section mismatch for R_ARM_THM_{MOVW_ABS_NC,MOVT_ABS}")
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/mod/modpost.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 73f4f5588b67..603a4f9587a4 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1286,6 +1286,23 @@ static int addend_386_rel(uint32_t *location, Elf_Rela *r) #ifndef R_ARM_THM_JUMP24 #define R_ARM_THM_JUMP24 30 #endif + +#ifndef R_ARM_MOVW_ABS_NC +#define R_ARM_MOVW_ABS_NC 43 +#endif + +#ifndef R_ARM_MOVT_ABS +#define R_ARM_MOVT_ABS 44 +#endif + +#ifndef R_ARM_THM_MOVW_ABS_NC +#define R_ARM_THM_MOVW_ABS_NC 47 +#endif + +#ifndef R_ARM_THM_MOVT_ABS +#define R_ARM_THM_MOVT_ABS 48 +#endif + #ifndef R_ARM_THM_JUMP19 #define R_ARM_THM_JUMP19 51 #endif