I've asked to OCaml developers. Xavier Leroy, lead OCaml developer, told me that:
* the "objdump -x binary | grep -qw caml_release_bytecode" or "objdump -t binary" patterns could be used;
* it would be better also to test an OCaml magic number at the last 12 bytes of the binary. The magic pattern to match is "Caml1999X[0-9][0-9][0-9]". So a
Hello Martin,
I've asked to OCaml developers. Xavier Leroy, lead OCaml developer, told me that: bytecode" or "objdump -t binary" patterns could be used; 0-9][0- 9][0-9] ". So a
* the "objdump -x binary | grep -qw caml_release_
* it would be better also to test an OCaml magic number at the last 12 bytes of the binary. The magic pattern to match is "Caml1999X[
tail -c 12 | egrep -q "Caml1999X[ 0-9][0- 9][0-9] "
should do the trick.
Yours,
d.