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

前端 未结 4 1848
我寻月下人不归
我寻月下人不归 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:25

    In some cases you can run ldd on the binary and find out which standard library it's linked against. For example on Solaris gcc vs Sun CC vs whatever.

    For C++ code, you can also dump some of the symbols, find a mangled function name, and then figure out which demangler generates the correct original name.

提交回复
热议问题