From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753533AbcIMCAZ (ORCPT ); Mon, 12 Sep 2016 22:00:25 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:33870 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbcIMCAY (ORCPT ); Mon, 12 Sep 2016 22:00:24 -0400 Date: Tue, 13 Sep 2016 12:00:14 +1000 From: Nicholas Piggin To: Guenter Roeck Cc: Michal Marek , Chen Liqin , Lennox Wu , linux-kernel@vger.kernel.org Subject: Re: Build failure in -next due to 'kbuild: allow archs to select link dead code/data elimination' Message-ID: <20160913120014.1036bf91@roar.ozlabs.ibm.com> In-Reply-To: <20160912222443.GA8425@roeck-us.net> References: <20160912222443.GA8425@roeck-us.net> Organization: IBM X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.*) \ - *(.bss) \ + *(.bss .bss.[0-9a-zA-Z_]*) \ etc? Thanks, Nick