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

Albert ARIBAUD albert.aribaud at free.fr
Wed Oct 13 11:05:09 CEST 2010


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.


More information about the U-Boot mailing list