I saw the toolchain for MIPS from broadcom(GCC-4.2.0, uClibc-0.9.29) does support -mplt option. I assumed they patched some code for uClibc and GCC also. I hope I could find some patch like it. but I did not find yet. On Sat, Jan 30, 2010 at 12:53 AM, Zhang Le <r0bertz@xxxxxxxxxx> wrote: > On 19:27 Fri 29 Jan , YD wrote: >> Hello, >> >> I have built the toolchain using the buildroot ( GCC 4.4.2 with >> uClibc-0.9.30.1 ) > > I think you need to check if uClibc supports this feature. > -mplt need support from libc, specifically dynamic loader, ld.so. > >> >> Everything works well but when I compiled with -mplt option, always it >> fails with Segmentation fault. >> >> I read some articles that with -mplt option, preformance will be 10% >> highter than without plt option. >> >> I don't know why this fails everytime. please help me... >> >> #include <stdio.h> >> int main() >> { >> printf("Hello world \n"); return 0; >> } >> >> #mipsel-linux-gcc -o a a.c >> Hello world >> #mipsel-linux-gcc -mplt -o a a.c >> Segmentation fault >> #mipsel-linux-gcc -mplt -no-shared -o a a.c >> Segmentation fault >> #mipsel-linux-gcc -mplt -no-shared -mabicalls -o a a.c >> Segmentation fault > > And -no-shared is actually not needed > http://gcc.gnu.org/ml/gcc/2008-12/msg00010.html > > You should be able to verify this by 'mipsel-linux-gcc -v' > > Zhang, Le >