From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BEA8C433EF for ; Wed, 20 Oct 2021 02:59:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E00856117A for ; Wed, 20 Oct 2021 02:59:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbhJTDBn (ORCPT ); Tue, 19 Oct 2021 23:01:43 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:26172 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbhJTDBm (ORCPT ); Tue, 19 Oct 2021 23:01:42 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4HYwKJ2fndz8tlq; Wed, 20 Oct 2021 10:58:12 +0800 (CST) Received: from kwepemm600003.china.huawei.com (7.193.23.202) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Wed, 20 Oct 2021 10:59:26 +0800 Received: from [10.67.110.146] (10.67.110.146) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Wed, 20 Oct 2021 10:59:25 +0800 Subject: Re: [QUESTION] Compile error on ppc32 with compilation option '-fdata-sections' From: Ye Weihua To: , , , , CC: References: Message-ID: Date: Wed, 20 Oct 2021 10:59:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.67.110.146] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Hi, I did additional testing on other architectures and found that only the ppc32 had this problem. Is there a difference between the compiler's support for the ppc32 architecture and other architectures? I hope you'll take the time to reply. Thanks. Kind regards, Weihua . On 2021/10/19 10:14, Ye Weihua wrote: > Hi, > > > When I was compiling the ppc32 kernel with the compilation option > '-fdata-sections', a compilation error occurred and the message was as > follows: > > >     "Inconsistent kallsyms data > >     Try make KALLSYMS_EXTRA_PASS=1 as a workaround" > > > After comparing the symbol tables, I found that the "_end" and > "__bss_stop" positions in Symtem.map and tmp_System.map are different: > in Symtem.map they are in the middle of the symbol table. In > tmp_System.map, they are at the end of the symbol table. > > > commit af73d78bd384aa9b add "strip-debug" to improve performance. > However, the addition takes effect only for tmp_vmlinux but not for > vmlinux. As a result, the symbol tables are different after the > "-fdata-sections" compilation option is enabled. > > > How the "strip-debug" compilation option affects symbol table order? > > Can "strip-debug" be added during vmlinux generation? > > > Kind regards, > > Weihua > > . >