From mboxrd@z Thu Jan 1 00:00:00 1970 From: Denys Vlasenko Subject: Re: [PATCH 1/23] make section names compatible with -ffunction-sections -fdata-sections Date: Wed, 2 Jul 2008 02:03:54 +0200 Message-ID: <200807020203.54809.vda.linux@googlemail.com> References: <200807020233.48646.vda.linux@googlemail.com> <60320.1214952973@turing-police.cc.vt.edu> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=UtKVPCPynvrdWZfmbTjmx6G7OgPquyg7Yiz55RyPoiY=; b=ptb+YwycEYOONNR5SiO0+lLg/sc44eu9BCHLrnY8sEDlYck+lVQBNRFVISkNcPs6zY HOAHdXvOYpgldwAfO2wkxwGqWwgab2o3xdrVNRQrSrbiK1RNgZ/cIS828LPj0SQKwrJp b6jN94iMZiAW0QR652vxNh2MwvTeY5k3c0tVk= In-Reply-To: <60320.1214952973@turing-police.cc.vt.edu> Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Valdis.Kletnieks@vt.edu Cc: linux-arch@vger.kernel.org, Andrew Morton , Russell King , David Howells , 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 On Wednesday 02 July 2008 00:56, Valdis.Kletnieks@vt.edu wrote: > On Wed, 02 Jul 2008 02:33:48 +0200, Denys Vlasenko said: > > > The purpose of these patches is to make kernel buildable > > with "gcc -ffunction-sections -fdata-sections". > > > > Newer gcc and binutils can do dead code and data removal > > at link time. It is achieved using combination of > > -ffunction-sections -fdata-sections options for gcc and > > --gc-sections for ld. > > Interesting idea. Do you happen to have before-and-after 'size vmlinux' > numbers to show how much space is actually reclaimed? After this patch there will be no change - it does not do dead code and data removal. I submitted bigger change before but it was probably too big for digestion. That earlier version was achieving ~10% kernel size reduction if kernel is built without loadable module support (loadable modules interfere with linker's dead code and data removal, need to add some rather contrived magic to make it work there too. Left as TODO for later). -- vda