On Thu, Nov 27, 2008 at 02:24:48AM +0800, Lin KJ wrote: > Hi all, > > In the ARM uClinux world, it seems that the user land XIP code should be > compiled with the "-fpic" and "-msingle-pic-base" flags. > Why not just "-fpic" flag? > Is it concern with the elf2flt tool?
I think it has more to do the loading FLAT executables. FLAT does not need run-time loader. As a result, relocatable symboles are only fixed up once by kernel. Single pic base would be much eaiser to do for this case. > I can have the applications and uClibc to be compiled with > "-msingle-pic-base", > but how about the libgcc.a? > Does the libgcc.a have to be produced with the "-msingle-pic-base" too? I took a look of what we did. Surprisingly it did get compiled with this option. A second look reveals that libgcc.a is a bunch of leaf functions (i.e., they never call or refer other functions/symbols). So they can link with almost all kinds of code (which makes sense). Cheers. Jun _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev