Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-10-28 (17:08)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: assembly
> Could someone tell me how to compile assembly code
> generated by ocamlopt?
> I am doing some experiment. I have generated some
> assembly code using ocamlopt and modified it. Now
> I'd like to compile the modified code. What object
> files are needed for doing this?

If you run ocamlopt with the -verbose option, it will display all the
calls to the assembler and the linker that it performs.  In
particular, you'll see what assembler flags are used on your platform.

I'd guess that something like the below should work:

        ocamlopt -S -c
        <transform foo.s>
        as <machine-dependent options> -o foo.o foo.s
        ocamlopt -o myprog foo.cmx

Hope this helps,

- Xavier Leroy