From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754745AbcIMUZ0 (ORCPT ); Tue, 13 Sep 2016 16:25:26 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:41598 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750975AbcIMUZZ (ORCPT ); Tue, 13 Sep 2016 16:25:25 -0400 Subject: Re: Build failure in -next due to 'kbuild: allow archs to select link dead code/data elimination' To: Nicholas Piggin References: <20160912222443.GA8425@roeck-us.net> <20160913120014.1036bf91@roar.ozlabs.ibm.com> <50a6953d-48c6-4577-2be9-03e6bd5b0706@roeck-us.net> <20160913135115.089a933b@roar.ozlabs.ibm.com> Cc: Michal Marek , Chen Liqin , Lennox Wu , linux-kernel@vger.kernel.org From: Guenter Roeck Message-ID: Date: Tue, 13 Sep 2016 13:25:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160913135115.089a933b@roar.ozlabs.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/12/2016 08:51 PM, Nicholas Piggin wrote: > On Mon, 12 Sep 2016 20:17:30 -0700 > Guenter Roeck wrote: > >> Hi Nicholas, >> >> On 09/12/2016 07:00 PM, Nicholas Piggin wrote: >>> On Mon, 12 Sep 2016 15:24:43 -0700 >>> Guenter Roeck wrote: >>> >>>> Hi, >>>> >>>> your commit 'kbuild: allow archs to select link dead code/data elimination' >>>> is causing the following build failure in -next when building score:defconfig. >>>> >>>> arch/score/kernel/built-in.o: In function `work_resched': >>>> arch/score/kernel/entry.o:(.text+0xe84): >>>> relocation truncated to fit: R_SCORE_PC19 against `schedule' >>>> >>>> Reverting the commit fixes the problem. >>>> >>>> Please let me know if I can help tracking down the problem. >>>> In case you need a score toochain, you can find the one I use at >>>> http://server.roeck-us.net/toolchains/score.tgz. >>>> >>>> Thanks, >>>> Guenter >>> >>> It's not supposed to have any real effect unless the >>> option is selected, but there are a few changes to linker >>> script which must be causing it. >>> >>> There are two changes to vmlinux.lds.h. One is to KEEP a >>> few input sections, that *should* be kept anyway. The other >>> is to bring in additional sections into their correct output >>> section. >>> >>> Could you try reverting those lines of vmlinux.lds.h that >>> change the latter, i.e.: >>> >>> - *(.text.hot .text .text.fixup .text.unlikely) \ >>> + *(.text.hot .text .text.fixup .text.unlikely .text.*) \ >> >> This is the culprit. After removing " .text.*" it builds fine. > > Thanks for testing it. Some architectures have .text.x sections > not included here, I should have seen that. We should possibly > just revert that line and require implementing archs to do the > right thing. > I would call the build failure a regression, so it should either be reverted, or we'll need some other solution to fix the build failure. Thanks, Guenter > [ Convention is to use '.' to avoid C identifiers, so we should > use .text..x for these things. But that's not done completely > throughout the kernel, and a little invasive to do with this > series. I'll revisit this and clean things up subsequently after > this round gets merged. ] > > Thanks, > Nick >