How to determine which compiler has been used to compile an executable?

前端 未结 4 1846
我寻月下人不归
我寻月下人不归 2020-12-15 15:43

From a compiled file, can I see which compiler has been used to generate the file?

4条回答
  •  情书的邮戳
    2020-12-15 16:33

    Many compilers/linkers insert a .comment section in the output file which identifies them. There are also a number of more subtle behaviors you could create compiler fingerprints off of, but I know of no existing tools for this.

    If you have the source, the easiest solution would be to try compiling with each compiler in question until you get a binary that matches byte-for-byte (or even closely).

提交回复
热议问题