c++ - How to see the informations and compiler flags for .o files in linux? -



c++ - How to see the informations and compiler flags for .o files in linux? -

i using centos 6.02 64 bit. want see info , used compiler flags in .o files. there command or way see that? have seen architecture of .a file using objdump. couldn't seen info .o files.

there no general way extract compiler flags object file. can see compiling twice , without no-op switch -fverbose-asm (gcc flag affects generation of asm) , comparing objects - identical. there compiler specific extensions allow insert them during compile e.g. -frecord-gcc-switches in newer versions of gcc, places flags used in section .gcc.command.line. there various info inserted different compilers .comment section e.g. compile gcc 4.7.2 shows:

$objdump -s -j.comment <objfile> objfile: file format elf64-x86-64 contents of section .comment: 0000 00474343 3a202847 4e552920 342e372e .gcc: (gnu) 4.7. 0010 3200 2.

you can of course of study architecture in same way .a file, objdump -f.

c++ boost command centos

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -