如何确定使用了哪个编译器来编译可执行文件?

2022-01-17 00:00:00 c compiler-construction c++

从已编译的文件中,我可以看到使用哪个编译器生成文件吗?

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

推荐答案

还有一个很好的旧字符串"实用程序.转储它在二进制文件中找到的所有 ascii-ish 字符串.不同的编译器在它们生成的二进制文件中嵌入了不同数量的信息,但许多实际上会包含明显的标识字符串.

There's also the good old 'strings' utility. Dumps all ascii-ish looking strings it finds in the binary. Different compilers embed different amounts of information in the binaries they produce, but many will actually include obviously identifying strings.

相关文章