1

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.

Karun
  • 447
  • 5
  • 17

2 Answers2

22

you could try dumping the .comment section

objdump --full-contents --section=.comment yourprogram
tristan
  • 4,235
  • 2
  • 21
  • 45
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