# note this is not a functional shell script, # but rather a description of a series of steps to be taken in the shell PROG=$1 # 1) first we generate the required .s and startup files ocamlopt -dstartup -S $PROG # 2) the next step is to find which flags are passed from ocamlopt to gcc ocamlopt -verbose $PROG # 3) edit your .s file by hand # 4) call gcc manually using the flags output in step 2 being sure to pass both the startup.s and $PROG.s files to gcc as additional parameters