Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2714631iog; Mon, 27 Jun 2022 01:00:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uihQbt0xvjbTchb+2rX+TiqHPtzFAcS6fOx8fGHNakemhPhEMN6ORoHcVpgutpnpb9/E5d X-Received: by 2002:a05:6402:43c5:b0:435:89ee:578f with SMTP id p5-20020a05640243c500b0043589ee578fmr15351861edc.225.1656316838292; Mon, 27 Jun 2022 01:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656316838; cv=none; d=google.com; s=arc-20160816; b=bmSNkyA4jfUu8RTQqb2e97yDNn5Z6vXc1YznxXLcnchuA4JtJddRQjrlEexcJHm5q9 z+CYO1UY+3s/0makJbTbmJKYJ6b9jXgPZo00VWSjoAQd0b0zB9URizdzPUbr342QLpWC rkakyMGG58VoBAmhFf0jwUbI7OjneRgQOsH4MknUkWIg2yBNNADLiGN++S1lvGfVQrSy D3dirJuDdAr350Zm6qeZNXiHn8LEwNpHE0s1CcXLbz+onPIr5cmQk+LG5fd8olxd7/0y VZBiJ54yB+vanWvEV1nPRCCqtUAn6n7p/WwFA/RHs0BryebC2HwYvALmQZKFu1+ttqFM 4wkg== 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=bCxV+DYC7EDw5vvDzJyKRVsalTcWIK5ZxHHF4psCF5c=; b=H+gL0Kd4y+XOpN92RHonuBHwVkkQJwsDmCHZomX5YRiNhOn95bxN+w7VPMyJ3rVb/f v3c09+1S3gn+mcW7ljY1DFssx8RfhlQLu8o7XCzt1FIgFP9tXlrC5Bv8CcdLOVQgIPJR lMXcUhkZWvs6tuZRy6sg7O/VGEHKpK5wGy/BTnwem7cy7HFfTRiccRc5crfGORdcjnuh WyQDNX9pRISSfBp4AyAh9H1J9Vl3tRc84W2AQ3HQvDpHUq+AKwEvBxbP/DSimP8U1XYV IoK3S7tmr3L28S9HXDNha6mKmyK/pJE0dYmLOSh3gkpYBdGeY6M7DZr7Bnm5iW7bIeKy TWrA== 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 y4-20020a170906070400b006fa51d2401bsi11412874ejb.174.2022.06.27.01.00.13; Mon, 27 Jun 2022 01:00: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 S232861AbiF0HSe (ORCPT + 99 others); Mon, 27 Jun 2022 03:18:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232641AbiF0HSb (ORCPT ); Mon, 27 Jun 2022 03:18:31 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E23935F5A; Mon, 27 Jun 2022 00:18:26 -0700 (PDT) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxr9i8Wbli1rxfAA--.5381S2; Mon, 27 Jun 2022 15:18:21 +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] modpost: Add line break in the section mismatch warning Date: Mon, 27 Jun 2022 15:18:20 +0800 Message-Id: <1656314300-2749-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9Dxr9i8Wbli1rxfAA--.5381S2 X-Coremail-Antispam: 1UD129KBjvJXoW7uF4UWF1UZF1fJryfuFyUZFb_yoW8AF48pa yFk3sruryIyr4vqayIkrykZ347J34rWF93C3srCw4DWrsruw1kZr97AF4xZF90yFW8AFWS qF18trn5u3yDA37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j 6r4UJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK67AK6r4x MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr 0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0E wIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJV W8JwCI42IY6xAIw20EY4v20xvaj40_Wr1j6rW3Jr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1l IxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUjX_-PUUUU U== 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 an line break in it. 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 --- 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