From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbcIBJZd (ORCPT ); Fri, 2 Sep 2016 05:25:33 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:34846 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbcIBJZb (ORCPT ); Fri, 2 Sep 2016 05:25:31 -0400 Date: Fri, 2 Sep 2016 10:24:50 +0100 From: Russell King - ARM Linux To: "Wiebe, Wladislav (Nokia - DE/Ulm)" Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ARM: fix linker call for ARM_MODULE_PLTS Message-ID: <20160902092450.GB1041@n2100.armlinux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 02, 2016 at 09:17:58AM +0000, Wiebe, Wladislav (Nokia - DE/Ulm) wrote: > module.lds script doesn't get called when > CONFIG_ARM_MODULE_PLTS is enabled. > Use KBUILD_LDFLAGS_MODULE to fix it. For those of us who haven't encountered this problem, could you include some commentry in the commit message describing the failure mechanism and why you think this is the correct solution? The final link for modules is: quiet_cmd_ld_ko_o = LD [M] $@ cmd_ld_ko_o = $(LD) -r $(LDFLAGS) \ $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ -o $@ $(filter-out FORCE,$^) which seems to always include both flags. Why is it ignored when it's in LDFLAGS_MODULE? What about the other flags we pass in LDFLAGS_MODULE? Thanks. > > Signed-off-by: Wladislav Wiebe > --- > arch/arm/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > index 61f6ccc..01c6025 100644 > --- a/arch/arm/Makefile > +++ b/arch/arm/Makefile > @@ -20,7 +20,7 @@ LDFLAGS_MODULE += --be8 > endif > > ifeq ($(CONFIG_ARM_MODULE_PLTS),y) > -LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds > +KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds > endif > > OBJCOPYFLAGS :=-O binary -R .comment -S > -- > 1.7.12.4 -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.