For cross compiling code for ARM processor, we have a GCC tool chain and a tool chain from ARM. Is it possible to check if a binary file was compiled using GCC tool chain or ARM tool chain.
Asked
Active
Viewed 8,213 times
2 Answers
22
you could try dumping the .comment section
objdump --full-contents --section=.comment yourprogram

tristan
- 4,235
- 2
- 21
- 45
-
Is it possible to get the same for SREC format? – Karun Oct 10 '13 at 17:01
1
If it's an ELF file, check if it has a .comment
section - many compilers write their identification string there. Otherwise, you may have to resort to checking the binary code. It's not trivial, but definitely doable. See this answer for details.

Community
- 1
- 1

Igor Skochinsky
- 24,629
- 2
- 72
- 109