From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [PATCH] (updated, rolled up) make section names compatible with -ffunction-sections -fdata-sections Date: Fri, 18 Jul 2008 12:53:08 +0100 Message-ID: <14472.1216381988@redhat.com> References: <200807172213.37411.vda.linux@googlemail.com> Return-path: In-Reply-To: <200807172213.37411.vda.linux@googlemail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Denys Vlasenko Cc: dhowells@redhat.com, Andrew Morton , mingo@elte.hu, x86@kernel.org, James Bottomley , Russell King , Ralf Baechle , Lennert Buytenhek , Josh Boyer , Paul Mackerras , David Woodhouse , Andi Kleen , torvalds@linux-foundation.org, Paul Gortmaker , linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org, Tim Bird , Martin Schwidefsky , Dave Miller Denys Vlasenko wrote: > The purpose of these patches is to make kernel buildable > with "gcc -ffunction-sections -fdata-sections". > > The problem is that with -ffunction-sections -fdata-sections gcc > creates sections like .text.head and .data.nosave > whenever someone has innocuous code like this: > > static void head(...) {...} > > or this: > > int f(...) { static int nosave; ... } > > somewhere in the kernel. > > Kernel linker script is confused by such names and puts these sections > in wrong places. > > This patch renames all "magic" section names used by kernel > to not have this format, eliminating the possibility of such collisions. > > Signed-off-by: Denys Vlasenko Acked-by: David Howells [FRV and MN10300]