Message ID | 20230611155100.2553804-11-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 k13csp2115911vqr; Sun, 11 Jun 2023 09:19:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6v2Db0+PgCnX88U4W3j9tmhBOHSoJoI7ajF8ofSr4JNncziLfqnvrRYEEneU+p+8yWmr40 X-Received: by 2002:a17:907:9412:b0:973:d1ce:dbe8 with SMTP id dk18-20020a170907941200b00973d1cedbe8mr6833212ejc.46.1686500366046; Sun, 11 Jun 2023 09:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686500366; cv=none; d=google.com; s=arc-20160816; b=Z8vH16Bj0xEO4WHLWsJD1HfbdE99AnB3wxkMm9HlGIYxXi+bLfumTHYz5og9wLH4DU dMgxroDeQAZJe01qB92bG7F0OyGQzZhrM/D5sXVIRtJOFHE6N9hzBUMkCpISWkJ8esNB WQVFz1Ng1CPkV875bLWYJizOZL8e+hnWZwSXqpVhMNNWybrN//d/lsOlbR5Cu0BnwIDz zEPzneY/T83RNED/SLJuDdqKvIiVXHkPAytWQPNbDNkZAYKCWKb23my+Qlf5BX5dlWti hG7xv9s4WOdnxEpX4KM8elNYNiDJHRG9oKxvmiiSxHKOmGska1XIFJfsaK5yLzDwzf69 Omcw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/hmbVHJOv66d0Ln8ogvvp8Od9n9W6nFgm/V6Gds/1/Y=; b=C/DqP//OMeikFoRLZljOt3LTrbaRkXIGWHG9c7xHDf6K6QCa0+7KPYWN+lnUwW58nf QhxuxrnYFYy5I1k+EarXUDP0xo9ZOi4/iFn30UAwVh27RMCrez6FZxQlpGYyFMxuFIvT meAMlgo1XGhdsptLHvE/n2KwFZPTd2nCN+aKGZQBEVXAwkHXVf/HaUYUJsr1vnaFiqso iGoDAwTjwT/3xFydZZOWLT1N9F2FlJnewGu6U1PWxsMuBJOc7DPLPdB493HdsfVrcf3m QeLLT4ZwknPscdCALV4mkDU1+uqzQPW2SMgvQuri3Bbi/ae4mqRfSsA0YBeJ/kn0ni85 SoVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=muffq5Uz; 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 s23-20020a1709066c9700b0096f7d53338bsi4147164ejr.593.2023.06.11.09.18.59; Sun, 11 Jun 2023 09:19:26 -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=muffq5Uz; 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 S233514AbjFKPwG (ORCPT <rfc822;liningstudo@gmail.com> + 99 others); Sun, 11 Jun 2023 11:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233753AbjFKPvs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 11 Jun 2023 11:51:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A63273D; Sun, 11 Jun 2023 08:51:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 223CA61C12; Sun, 11 Jun 2023 15:51:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31222C433EF; Sun, 11 Jun 2023 15:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686498687; bh=6BfvdfkpzilXQh7Twa7D0t4Xdd7OIdDDNqJCJ31RxEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=muffq5Uz8VAmufgQ5ev31AyDN0HI/J9VuDzigM9QOi8MWiDZqAvtkY0eu2ouCT3SG 9O3edtUNX/dTYRarrI7pJ3i3sIpAMhPr3426eq1uso34+yWtFAc1I5yI3YV1I0hQXk Mf2RxE6kjfHEfBfMwgd05WDbYqRJM9IntdDETlBhcINfjPZtWmE32XR27lAOZRW7VV FN1AV1Ajh7d1bbu154nAJWXobki1X3tWHk849bj2pH+cOwlWAuJv7U9x/0eZNpVe7/ ICalL1vzDxhVHYwQ7alW7fRaeU6bYf1rlUEt0Jws8oZ1MZ9kHTeIV8jGt8IjWK6TuS QfjCzQmWrdjNQ== From: Masahiro Yamada <masahiroy@kernel.org> To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu>, linux-snps-arc@lists.infradead.org, Masahiro Yamada <masahiroy@kernel.org> Subject: [PATCH v9 10/11] modpost: show offset from symbol for section mismatch warnings Date: Mon, 12 Jun 2023 00:50:59 +0900 Message-Id: <20230611155100.2553804-11-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230611155100.2553804-1-masahiroy@kernel.org> References: <20230611155100.2553804-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1768423807765477053?= X-GMAIL-MSGID: =?utf-8?q?1768423807765477053?= |
Series |
Unify <linux/export.h> and <asm/export.h>, remove EXPORT_DATA_SYMBOL(), faster TRIM_UNUSED_KSYMS
|
|
Commit Message
Masahiro Yamada
June 11, 2023, 3:50 p.m. UTC
Currently, modpost only shows the symbol names and section names, so it repeats the same message if there are multiple relocations in the same symbol. It is common the relocation spans across multiple instructions. It is better to show the offset from the symbol. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> --- scripts/mod/modpost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0adda14451fa..f26d5050e6da 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1147,8 +1147,8 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf, sec_mismatch_count++; - warn("%s: section mismatch in reference: %s (section: %s) -> %s (section: %s)\n", - modname, fromsym, fromsec, tosym, tosec); + warn("%s: section mismatch in reference: %s+0x%x (section: %s) -> %s (section: %s)\n", + modname, fromsym, (unsigned int)(faddr - from->st_value), fromsec, tosym, tosec); if (mismatch->mismatch == EXTABLE_TO_NON_TEXT) { if (match(tosec, mismatch->bad_tosec))