Version française
Home     About     Download     Resources     Contact us    
Browse thread
Manipulation objet files
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <alain@f...>
Subject: Re: [Caml-list] Manipulation objet files
Ed Keith wrote:
> Before I reinvent the wheel I thought I'd ask is anyone knows of any
libraries, that can be accessed from ocaml, to read and write object
files. In particular I need to read and write ELF files, Windows PE
files, the .obj files generated by Visual C++ (I think there are PE
files, but am not sure yet) and the .o files generated by mingw (I think
there are a.out files, but am not sure yet).

Visual C++ and gcc under Windows (Cygwin / MinGW) both produce COFF 
object files and static libraries (.obj/.lib, .o/.a), which can be 
linked to PE image files (.dll, .exe). Note that despite their suffix, 
objects and static libraries produced by gcc under Windows are regular 
COFF files.

flexdll contains a module to parse COFF objects and libraries and write
COFF objects (not libraries). The module has not been designed as a 
standalone library, just as a support module for flexdll (the same 
module is also used internally by LexiFi for our direct x86 COFF code 
generator for ocamlopt, which avoids the use of an external compiler), 
but it handles most of the COFF spec. There is also a minimal DLL writer 
in flexdll, but it is far from complete (e.g. it does not support 
embedding of Win32 resource files into the DLL).


http://alain.frisch.fr/flexdll.html


Regards,

Alain