Discussion:
Dynamic linking in native code
Alain Frisch
2007-06-07 07:22:32 UTC
Permalink
Dear MetaOCamlers,

I've been working recently on adding support for dynamic linking of
native code into OCaml. There is now a working native Dynlink module,
with exactly the same interface as the bytecode one, and also a native
toplevel. This has been tested under Linux x86, Linux AMD64, Windows x86
(Cygwin, Mingw and MS ports). For AMD 64, I had to change the code
generator to produce position-independant code. For Windows, I rely
on a tool to simulate the dlopen API:
http://alain.frisch.fr/flexdll.html
For Linux x86, there was no problem :-)

I understand that MetaOCaml also has some support and need for
dynlinking native code. Maybe it could benefit from relying on the new
mechanism. If you want to look at it, it is in the natdynlink branch
of the OCaml CVS (it is in sync with OCaml 3.10.0).

Let me know if you have questions or if you plan to use it!

Alain
Walid Taha
2007-06-08 23:08:02 UTC
Permalink
Thanks a lot for this update, Alain!

Oleg implementated the native code support for MetaOCaml, and I hope that
he will be able to take advantage of this new interface. I also hope that
the folks at INRIA will be able to incorporate these new modifications
into the main development branch.

Walid.

|Dear MetaOCamlers,
|
|I've been working recently on adding support for dynamic linking of
|native code into OCaml. There is now a working native Dynlink module,
|with exactly the same interface as the bytecode one, and also a native
|toplevel. This has been tested under Linux x86, Linux AMD64, Windows x86
|(Cygwin, Mingw and MS ports). For AMD 64, I had to change the code
|generator to produce position-independant code. For Windows, I rely
|on a tool to simulate the dlopen API:
| http://alain.frisch.fr/flexdll.html
|For Linux x86, there was no problem :-)
|
|I understand that MetaOCaml also has some support and need for
|dynlinking native code. Maybe it could benefit from relying on the new
|mechanism. If you want to look at it, it is in the natdynlink branch
|of the OCaml CVS (it is in sync with OCaml 3.10.0).
|
|Let me know if you have questions or if you plan to use it!
|
| Alain
|_______________________________________________
|MetaOCaml-Hackers-L mailing list
|MetaOCaml-Hackers-***@mailman.rice.edu
|https://mailman.rice.edu/mailman/listinfo/metaocaml-hackers-l
|

Loading...