From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA28591; Mon, 19 Jul 2004 15:48:47 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA27395 for ; Mon, 19 Jul 2004 15:48:46 +0200 (MET DST) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i6JDmkSH030924; Mon, 19 Jul 2004 15:48:46 +0200 Received: by yquem.inria.fr (Postfix, from userid 18180) id 06FB6BC78; Mon, 19 Jul 2004 15:48:46 +0200 (CEST) Date: Mon, 19 Jul 2004 15:48:46 +0200 From: Xavier Leroy To: Sven Luther Cc: caml-list@inria.fr Subject: Re: [Caml-list] prelinking ocamlfind Message-ID: <20040719134845.GB30112@yquem.inria.fr> References: <20040716144701.GB1905@yquem.inria.fr> <20040717150442.GA25514@pegasos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040717150442.GA25514@pegasos> User-Agent: Mutt/1.3.28i X-Miltered: at concorde with ID 40FBD13E.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ocamlfind:01 fork:01 initialized:01 ocamlc:01 ocamlc:01 -output-obj:01 -output-obj:01 arrays:01 -custom:01 -custom:01 bytecode:01 bytecode:01 simpler:01 worse:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Xavier, i have been told that this probably happens because we use a elf > section that is normally strippable. It's even worse than that, but I won't get into details :-) > It could be solved by using a > special elf section specialized to our need (maybe one named bytecode or > something), then at least strip and possibly the prelink stuff, would > not remove it as it does not. Yes, but: - This solution is not portable to non-ELF platforms (e.g. MS Windows), thus forcing an unpleasant fork in the code. - The ELF format is very complex. There are libraries that facilitate manipulations of ELF files (e.g. libelf), but these are not universally available and severely under-documented. Rather than muck with ELF, a simpler solution would be to embed the bytecode executable as initialized C arrays in the executable generated by ocamlc -custom. That's what ocamlc -output-obj does, and I believe it shouldn't be too hard to adapt the existing -output-obj code to the -custom case. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners