From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 27 Mar 2012 19:48:59 +0200 Subject: [U-Boot] BIOS EMULATOR driver In-Reply-To: <20120327172805.D5DCC2002FF@gemini.denx.de> References: <20120327172805.D5DCC2002FF@gemini.denx.de> Message-ID: <201203271949.00034.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Denk, > Dear =?ISO-8859-2?Q?Viktor_K=F8iv=E1k?=, > > In message you wrote: > > >> And even if it was, the combination of -ffunction-sections / > > >> -fdata-sections with --gc-sections should prevent any damages. > > ... > > > Yes that's the main problem. Lots of code i unused. Basically > > everything except BootVideoCardBIOS, that is use in ATI video driver. > > I've got two solution of this problem. First, mark all unused code by > > some macro and compile it only conditionally or remove it. But I not > > sure if someone use this death code for debug purposes. > > Did you check if you really find any such code in your linked image? > As I already explained, normally -ffunction-sections / -fdata-sections > with --gc-sections should make sure any unused functions get dropped > automatically. Sure, but I see no point in keeping such dead code in U-Boot code base. Aka. why keep functions in U-Boot that are never used? > > Best regards, > > Wolfgang Denk Best regards, Marek Vasut