From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Subject: Re: [PATCH 2/2] linker script: unify usage of discard definition Date: Fri, 17 Jul 2009 23:13:12 +0200 Message-ID: <20090717211312.GD7080@merkur.ravnborg.org> References: <4A546646.70305@kernel.org> <4A546670.6070701@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4A546670.6070701@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: Tejun Heo Cc: "linux-arch@vger.kernel.org" , Linux Kernel , Michal Simek , microblaze-uclinux@itee.uq.edu.au, Paul Mundt , Tony Luck , Mike Frysinger List-Id: linux-arch.vger.kernel.org On Wed, Jul 08, 2009 at 06:27:12PM +0900, Tejun Heo wrote: > Discarded sections in different archs share some commonality but have > considerable differences. This led to linker script for each arch > implementing its own /DISCARD/ definition, which makes maintaining > tedious and adding new entries error-prone. > > This patch makes all linker scripts to move discard definitions to the > end of the linker script and use the common DISCARDS macro. As ld > uses the first matching section definition, archs can include default > discarded sections by including them earlier in the linker script. > > ia64 is notable because it first throws away some ia64 specific > subsections and then include the rest of the sections into the final > image, so those sections must be discarded before the inclusion. > > defconfig compile tested for x86, x86-64, powerpc, powerpc64, ia64, > alpha, sparc, sparc64 and s390. Michal Simek tested microblaze. > > Signed-off-by: Tejun Heo > Acked-by: Paul Mundt > Acked-by: Mike Frysinger > Tested-by: Michal Simek > Cc: linux-arch@vger.kernel.org > Cc: Michal Simek > Cc: microblaze-uclinux@itee.uq.edu.au > Cc: Sam Ravnborg > Cc: Tony Luck Patch looks good - thanks! Acked-by: Sam Ravnborg Sam From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pfepb.post.tele.dk ([195.41.46.236]:58761 "EHLO pfepb.post.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757025AbZGQVNN (ORCPT ); Fri, 17 Jul 2009 17:13:13 -0400 Date: Fri, 17 Jul 2009 23:13:12 +0200 From: Sam Ravnborg Subject: Re: [PATCH 2/2] linker script: unify usage of discard definition Message-ID: <20090717211312.GD7080@merkur.ravnborg.org> References: <4A546646.70305@kernel.org> <4A546670.6070701@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A546670.6070701@kernel.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Tejun Heo Cc: "linux-arch@vger.kernel.org" , Linux Kernel , Michal Simek , microblaze-uclinux@itee.uq.edu.au, Paul Mundt , Tony Luck , Mike Frysinger Message-ID: <20090717211312.KnE5kME8xgEC1j4E7k0McpIpzp-jqbjjkj8X1Dn-KA0@z> On Wed, Jul 08, 2009 at 06:27:12PM +0900, Tejun Heo wrote: > Discarded sections in different archs share some commonality but have > considerable differences. This led to linker script for each arch > implementing its own /DISCARD/ definition, which makes maintaining > tedious and adding new entries error-prone. > > This patch makes all linker scripts to move discard definitions to the > end of the linker script and use the common DISCARDS macro. As ld > uses the first matching section definition, archs can include default > discarded sections by including them earlier in the linker script. > > ia64 is notable because it first throws away some ia64 specific > subsections and then include the rest of the sections into the final > image, so those sections must be discarded before the inclusion. > > defconfig compile tested for x86, x86-64, powerpc, powerpc64, ia64, > alpha, sparc, sparc64 and s390. Michal Simek tested microblaze. > > Signed-off-by: Tejun Heo > Acked-by: Paul Mundt > Acked-by: Mike Frysinger > Tested-by: Michal Simek > Cc: linux-arch@vger.kernel.org > Cc: Michal Simek > Cc: microblaze-uclinux@itee.uq.edu.au > Cc: Sam Ravnborg > Cc: Tony Luck Patch looks good - thanks! Acked-by: Sam Ravnborg Sam