Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965789AbbDVJAl (ORCPT ); Wed, 22 Apr 2015 05:00:41 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:32777 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965682AbbDVJAh convert rfc822-to-8bit (ORCPT ); Wed, 22 Apr 2015 05:00:37 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 22 Apr 2015 17:00:36 +0800 Message-ID: Subject: Re: [PATCH] blackfin: Makefile: Skip reloc overflow issue when COMPILE_TEST enabled From: Steven Miao To: Chen Gang Cc: Richard Weinberger , bfin , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1996 Lines: 50 Hi, On Thu, Apr 9, 2015 at 5:03 AM, Chen Gang wrote: > l1_text is at L1_CODE_START (e.g. for bf533, 0xff800000). If the kernel > is too big, it may be overwritten, the related issue: > > LD init/built-in.o > init/built-in.o: In function `do_early_param': > init/main.c:(.init.text+0xe0): relocation truncated to fit: R_BFIN_PCREL24 against symbol `strcmp' defined in .l1.text section in arch/blackfin/lib/lib.a(strcmp.o) > init/main.c:(.init.text+0x10e): relocation truncated to fit: R_BFIN_PCREL24 against symbol `strcmp' defined in .l1.text section in arch/blackfin/lib/lib.a(strcmp.o) blackfin toolchain generate 24 bit pc-relative calls by default, with a range of –16,777,216 through 16,777,214 (0xFF00 0000 to 0x00FF FFFE) is available. So call to l1_text should be ok. What do you mean the kernel is too big? http://docs.blackfin.uclinux.org/doku.php?id=ism:call > init/built-in.o: In function `unknown_bootoption': > > blackfin is for embedded system, the size limitition is acceptable, so > it is not the real world issue, which should be skipped if COMPILE_TEST > enabled. > > > Signed-off-by: Chen Gang > --- > arch/blackfin/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile > index 2ece4e3..e5195b4 100644 > --- a/arch/blackfin/Makefile > +++ b/arch/blackfin/Makefile > @@ -20,6 +20,9 @@ endif > KBUILD_AFLAGS += $(call cc-option,-mno-fdpic) > KBUILD_CFLAGS_MODULE += -mlong-calls > LDFLAGS += -m elf32bfin > +ifeq ($(CONFIG_COMPILE_TEST),y) > +LDFLAGS += --noinhibit-exec > +endif > > KBUILD_DEFCONFIG := BF537-STAMP_defconfig > > -- > 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/