problem of non-pic code due to asm code.
Ian Lance Taylor
iant@google.com
Sat Aug 22 00:06:00 GMT 2009
Hector Oron <hector.oron@gmail.com> writes:
> Is there a common way to detect (maybe with binutils) if a shared
> library has been compiled with -fPIC?
I don't know a way that works for all targets. In most cases, readelf
-r | grep 'GOT|PLT' will work--if the grep finds anything, the code was
compiled with -fPIC.
Of course some code is the same with and without -fPIC, and there is no
way to detect -fPIC in such a case.
Ian
More information about the Gcc-help
mailing list