In a project, my colleague create a static library, e.g liba.a, which linked with app.
In liba.a he overwrites the libc malloc() to his owner version.
I create a shared library libs.so which also linked with app.
The problem is when my libs.so linked with app, the malloc() used in my libs.so will be the one in liba.a, not the one in standard libc.so, this causes problems.
Then, I want static link the libc.a to my libs.so, I used -static -shared -fPIC flags for gcc.
But I always get arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: arm-2012.03/bin/../arm-none-linux-gnueabi/libc/usr/lib/libc.a(dl-tsd.o)(.text+0x14): R_ARM_TLS_LE32 relocation not permitted in shared object.
Does anyone have idea about it?
Thanks forward.