English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 foo.ml
        <transform foo.s>
        as <machine-dependent options> -o foo.o foo.s
        ocamlopt -o myprog foo.cmx

Hope this helps,

- Xavier Leroy