I have a bunch of static libraries in my hand, which all have two versions -- 32bit and 64bit. When I use these static libraries to compile into a shared library, weird things happened: 1. I use 64bit static libraries to compile a 64bit shared library, everything works well; 2. I use 32bit static libraries to compile a 32bit shared library, ld tells me that the [text section is not shareable].
So, I guess that 32bit static libraries don't use -fPIC flag, but my colleague tells me he dit add the flag. But I still suspect that, so is there a way to find out whether the static library do add the -fPIC flag. PS: I know use readelf or objdump may get some clues, but is there a better way?