
Albert ARIBAUD albert.aribaud@free.fr wrote on 2010/10/13 11:05:09:
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.
Ah, that was you. That patch made me look at adding -msingle-pic-base to ppc :)
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.
No, -fpic can handle 32KiB, if it gets bigger you have to use -fPIC. My board uses about 7.5 KiB GOT+fixups
Jocke