Finding gcc options from a .so lib

David Daney ddaney@avtrex.com
Mon Mar 31 14:55:00 GMT 2008


Andrew Haley wrote:
> M K wrote:
>   
>> Hello,
>>
>> If I have a .so library, can I find out the compilation flags that
>> were used when the .so was being built?
>>     
>
> No.
>   
Unless the .so was build with GCC-4.3 or later *and* the 
|-frecord-gcc-switches| option was used.  In this case you could extract 
the information using the objdump program.  Note that I have never used 
this new feature so this comment is based solely on the compiler 
documentation.

David Daney



More information about the Gcc-help mailing list