Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2714077iog; Mon, 27 Jun 2022 00:59:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ubukPY5opv1iNphqFxJKBQGSqRY3BXjXLjtMb2rv7Eu1kZBXt6uhUgUVvmvnInkwiv6ixG X-Received: by 2002:a17:907:16a6:b0:726:574d:d31f with SMTP id hc38-20020a17090716a600b00726574dd31fmr9541334ejc.514.1656316778489; Mon, 27 Jun 2022 00:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656316778; cv=none; d=google.com; s=arc-20160816; b=rKxlsAB7KhVifkY4cmsyAYdV9rRcusLT91DrZsZe+DdyGZgmFv8F2xZ03rR1XTc1fB wwLY/gKpEzkENH4w9QiO+3t9JtRTIJP9EgOUXl6n8a9L4sDUTmVIojsKPQzzxXXLgq5k 611eUPxrzk3VuFMJoPd2NPlACiUuPpIi5lur0fvxp7dBcwcCZKMVTNfnBbBRv6EoXz2V 2EozLvcinNp588SWgoUdBgRubQDTK1snOx5ccyuWit1/1mDCCU5Oi/Bu6Js/jtFmc8+u WeDpz4a8/QfjVE43aL+daN9xyw6FekkiJP7atmUaF6SMP7AakkB9aKCqV9ALlKEysj0n T/cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=gJX5B/BW4Sg8zukSRJ5QTlPmpluII7fbq7lkinRjYg4=; b=eV0N5aHIW/3Raw5p/OYC1jCviVaMZuvIRct10nWhVB60RR9IVYe1BIqu79aGIiP9AN HKpqHm2n8V9LsDpPDRFo7ffrYQIqBbXy1OWOHCes6gPU2/wqh9N9tbHqSID9IXuy25yl I9H0G12Qc7GRWYj7flmEEI5dJ2TPh+5+p2/TjZMAT/+kWmmjUCVqvqPSemHES2enZEly RiTOr8k0an64WOd1Ysm1DyxqsUyfHtl/OA7Xbdk9mwdUNAVIARH0SzUe1AjlwuswS55G nC0/oz0dklLc5tlZTEAEpiVN5K11eFk6eREkSSmmjZaDvAjaWUMIgZ17KmPvwBgZzuuP gYbg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020aa7d1c8000000b004356d83e000si11333892edp.62.2022.06.27.00.59.14; Mon, 27 Jun 2022 00:59:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232698AbiF0H1Q (ORCPT + 99 others); Mon, 27 Jun 2022 03:27:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232326AbiF0H1O (ORCPT ); Mon, 27 Jun 2022 03:27:14 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ECDE35F99; Mon, 27 Jun 2022 00:27:12 -0700 (PDT) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxb93MW7li8r1fAA--.5898S2; Mon, 27 Jun 2022 15:27:08 +0800 (CST) From: Tiezhu Yang To: Masahiro Yamada , Michal Marek , Nick Desaulniers Cc: Xuefeng Li , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] modpost: Add line break in the section mismatch warning Date: Mon, 27 Jun 2022 15:27:08 +0800 Message-Id: <1656314828-3544-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9Dxb93MW7li8r1fAA--.5898S2 X-Coremail-Antispam: 1UD129KBjvJXoW7uF4UWF1UZF1fJryfuFyUZFb_yoW8Aw48pa yFk3sruryIyr4vqayIkrykZ347J34rWF93C3srCw4Dursruw1kZF97AF4xZF90yFWrAFWF qF48trn5uayqk37anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvK14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26r xl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj 6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr 0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkF7I0En4kS14v2 6r126r1DMxkIecxEwVAFwVW8CwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJV W8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF 1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6x IIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6rWUJVWrZr1UMIIF 0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxh VjvjDU0xZFpf9x0JUVT5LUUUUU= X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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 The section mismatch warning may be too long, add a line break to make it more readable. Without this patch: LD vmlinux.o MODPOST vmlinux.symvers WARNING: modpost: vmlinux.o(___ksymtab+prom_init_numa_memory+0x0): Section mismatch in reference from the variable __ksymtab_prom_init_numa_memory to the function .init.text:prom_init_numa_memory() The symbol prom_init_numa_memory is exported and annotated __init Fix this by removing the __init annotation of prom_init_numa_memory or drop the export. With this patch: LD vmlinux.o MODPOST vmlinux.symvers WARNING: modpost: vmlinux.o(___ksymtab+prom_init_numa_memory+0x0): Section mismatch in reference from the variable __ksymtab_prom_init_numa_memory to the function .init.text:prom_init_numa_memory() The symbol prom_init_numa_memory is exported and annotated __init Fix this by removing the __init annotation of prom_init_numa_memory or drop the export. This is based on Linux 5.19-rc4. Signed-off-by: Tiezhu Yang --- v2: update the commit message 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 620dc8c..4cc894f 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1320,8 +1320,8 @@ static void report_sec_mismatch(const char *modname, get_pretty_name(from_is_func, &from, &from_p); get_pretty_name(to_is_func, &to, &to_p); - warn("%s(%s+0x%llx): Section mismatch in reference from the %s %s%s " - "to the %s %s:%s%s\n", + warn("%s(%s+0x%llx): Section mismatch in reference\n" + "from the %s %s%s to the %s %s:%s%s\n", modname, fromsec, fromaddr, from, fromsym, from_p, to, tosec, tosym, to_p); -- 2.1.0