Skip to content

Instantly share code, notes, and snippets.

@Kakadu
Created April 5, 2021 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kakadu/6b4d4b71eb5aaf2a44c66749f671481e to your computer and use it in GitHub Desktop.
Save Kakadu/6b4d4b71eb5aaf2a44c66749f671481e to your computer and use it in GitHub Desktop.
ocaml 32bit
➜ /tmp echo "" > a.ml && ocamlfind opt -output-obj a.ml -o camlcode.o
➜ /tmp gcc -m32 -o myprog camlcode.o -L`ocamlc -where` -lasmrun -ldl -lm
➜ /tmp which ocamlc
/home/kakadu/.opam/4.11.2+32bit/bin/ocamlc
➜ /tmp file myprog
myprog: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=e9f3726edcbf6201667f87a20fb45700e1219763, for GNU/Linux 3.2.0, with debug_info, not stripped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment