Can you find out which compiler was used to compil

2019-03-14 16:41发布

Given an executable that is compiled from C to run on Solaris, is it possible to determine which compiler was used to compile the associated incomplete executable?

I can't see anything when using either the strings or the file command, and magic doesn't seem to contain anything specific.

Do compilers generally put a fingerprint in their executable output files?

cheers,

7条回答
神经病院院长
2楼-- · 2019-03-14 17:16

If the executable isn't stripped, try /usr/ccs/bin mcs-p This will usually show the compiler, linker and all the header files used

查看更多
smile是对你的礼貌
3楼-- · 2019-03-14 17:16

Compilers usually add their own personal "signature" as plaintext in the compiled files. You can use a tool such as strings to suss the plaintext out.

查看更多
在下西门庆
4楼-- · 2019-03-14 17:18

Build small test apps with each compiler you're trying to identify. Then look at the results in a hex editor, and try to find patterns. It might turn out to be really obvious -- for example the "Rich" signatures from Microsoft's linker.

查看更多
相关推荐>>
5楼-- · 2019-03-14 17:22

Visual Studio and GCC typically follow different startup routines (which call main). That maybe a hint. I don't know about others though. For dlls, can't think of something similar off the top of my head.

查看更多
何必那么认真
6楼-- · 2019-03-14 17:23

PEID will do the trick. It generally works just great. Obviously PEID is a windows tool but it shouldn't matter and should show you to compiler (sometimes even specific version information)

查看更多
仙女界的扛把子
7楼-- · 2019-03-14 17:28

Yes IDA is great for this. It uses a technology called FLIRT.

查看更多
登录 后发表回答