From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 13 Oct 2010 11:05:09 +0200 Subject: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support In-Reply-To: References: <1286887081-23172-1-git-send-email-Joakim.Tjernlund@transmode.se> <20101012125218.6ABE21508A2@gemini.denx.de> <20101012105258.372089f5@udp111988uds.am.freescale.net> <4CB49DE6.5060801@free.fr> <4CB4C722.8020905@free.fr> <4CB55209.2080803@free.fr> Message-ID: <4CB57645.20505@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 13/10/2010 09:07, Joakim Tjernlund a ?crit : > Did you use -msingle-pic-base too with -fpic/-fPIC? This is what makes > a difference(together with -fpic). The most interesting size is > the total flash size IMHO. Reducing insn's in RAM at the expense > of flash is not what most users need I think. Yes, I did use -msingle-pic-base -- actually, I am the one who submitted the patch for ARM to that effect, precisely after all my tests :) -- but the code growth I am talking about is accesses, not setup. >> This simply implies that -fPIC is a better choice for PPC (and hence >> -mrelocatable) while -fpie is a better one for ARM. > > -fPIC isn't optimal(it is bigger) but until my gcc patch gets into > gcc one cannot use -fpic(it gets promoted to -fPIC by gcc). > -fpic is smaller but one cannot build apps has has a GOT over 32KB with > that You get a GOT over 32 KiB? IIRC, the reloc tables for ARM with -pie are slightly below 19 KiB for a typical u-boot; I'm surprised that a GOT would go bigger than the ELF table for the same work. Amicalement, -- Albert.