[U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

Albert ARIBAUD albert.aribaud at free.fr
Wed Oct 13 08:30:33 CEST 2010


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.


More information about the U-Boot mailing list