Re: problem of non-pic code due to asm code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hector Oron <hector.oron@xxxxxxxxx> 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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux