Comment 7 for bug 180364

Revision history for this message
David MENTRÉ (dmentre) wrote :

Hello Martin,

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

  tail -c 12 | egrep -q "Caml1999X[0-9][0-9][0-9]"

should do the trick.

Yours,
d.