'Good news everyone' patch
The patch itself [4a_shared.patch.gz 46k]
Ported to OCaml 3.07 by Vitaly Lugovsky, so all your credits are belong to him.[*]
What is it?
A patch, against OCaml 3.07, making it possible to:
create, link against and dynamically load shared objects on i386 ELF and Win32 platforms.
What's new (in 4a) compared to 4_fix
- Patch is now against OCaml 3.07
- No testing whatsoever on Win32
What's new (in 4) compared to 3a_fix
- Patch is now against OCaml 3.06
- Win32 support (Native tools only)
- Reworked much of registration/deregistration code
(It wasn't correct before, hopefully it is now)
- Limited backtrace support for native code
- Removed CamlP4 modifications
(Patch is way to big already, besides it wouldn't work on windows)
- Added some examples
Release notes can be found here
Installation
- mkdir scaml
- cd scaml
- wget
OCaml 3.07
- wget patch
- tar xvfz ocaml-3.07.tar.gz
- zcat 4a_shared.patch.gz | patch -p0
- cd ocaml-3.07
- Read platform notes and issue appropriate commands
You are all set now.
Examples
Here [examples.zip 8k]
Problems
- Under Linux linking against shared objects created with Shared OCaml requires
GNU Binutils 2.12(or later)
- Currently only works on Linux i386 and Win32.
- The code is not well tested
- Slightly slower compilation times(not noticeable on my machine)
- Slightly bigger executables
- Somewhat bigger intermediate assembly output
- Possibly slower run times
- More issues with Win32 than i care to mention
- Documentation (lack of it)
Other platforms
In theory this should work on all platforms with sufficiently
smart dynamic linker and ld that can omit copy relocations: GNU
ld(i386-elf, ia64-elf) with '-z nocopyreloc', SUN's linker with
-b.
Feedback
Send comments, suggestions, flame to
malc@pulsesoft.com or
moosotc@gmail.com
Ways to get GNU Binutils 2.12+:
here
[ocaml7beta-shared4new.patch.gz 34k]
Previous patches
Fourth (4 [4_shared.patch.gz 34k],
4_Fix [4_fix_shared.patch.gz 3k] 
[*]), for OCaml 3.06
Third (3a, 3a_fix)
Second
First
4_fix_shared is small patch against 4_shared(ie not standalone). It fixes
two problems(Coq should build now), no new features introduced. It has recieved
even less testing than 4_shared, you have been warned.
Malcy
Last modified: Wed Oct 1 16:19:26 MSD 2003