From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 13 Oct 2010 08:30:33 +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> Message-ID: <4CB55209.2080803@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 12/10/2010 23:00, Joakim Tjernlund a ?crit : > Yes, but the difference isn't really the arch. It is the -mrelocatable > flag that is the big difference. Not only: obviously, implementing GOT relocation is not done the same on both archs, and it simply is not beneficial on ARM wrt PPC in terms of instructions. I did a pretty extensive run of tests with and without -fPIC and -fPIE on ARM, and GOT relocation clearly makes code bigger, whereas it does not PPC. This simply implies that -fPIC is a better choice for PPC (and hence -mrelocatable) while -fpie is a better one for ARM. Amicalement, -- Albert.