Which GCC version did I use?

Compiling can be magic somehow. Especially if you try to reconstruct strange behaviour of a special binary. The interesting question in that case is, which gcc version was used for a particiular binary.

As GCC writes its version information, we can find it out with a simple command chain:

strings -a /path/to/binary-file | grep “GCC:” | sort -u


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.