2

I have several binaries compiled with gcc/g++ and others compiled with clang/clang++.

So far i have tried:

strings -a ./myBinary | grep -i clang
objdump -s --section .comment ./myBinary
readelf -p .comment ./myBinary

and each one of this command fails to recognize the binaries produced by clang, and each file produced by Clang is recognized as produced by gcc and basically all my binaries are produced by the same compiler according to this tools.

Does Clang puts the same signature as GCC ? How i can get informations about what compilers have generated that binaries ?

Thanks.

guz
  • 1,361
  • 1
  • 10
  • 13
  • Please have a look at this question http://stackoverflow.com/questions/16362914/can-i-compile-a-function-with-gcc-and-then-use-it-with-clang – Konrad Kleine Jul 18 '14 at 09:19
  • Possible duplicate of [Can I compile a function with gcc and then use it with clang?](https://stackoverflow.com/questions/16362914/can-i-compile-a-function-with-gcc-and-then-use-it-with-clang) – recnac Apr 24 '19 at 01:57

1 Answers1

0

I guess it's a duplicate of stackoverflow.com/questions/43523698/clang-appears-to-use-gcc

It seems that if you link against a glibc built by GCC, the latter takes the credits.

Marcelo Ruggeri
  • 1,939
  • 1
  • 17
  • 10