From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 05EE5820A1 for ; Tue, 10 Sep 2013 18:46:41 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of Xavier.Leroy@inria.fr) identity=pra; client-ip=212.27.42.1; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Xavier.Leroy@inria.fr"; x-sender="Xavier.Leroy@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of Xavier.Leroy@inria.fr) identity=mailfrom; client-ip=212.27.42.1; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Xavier.Leroy@inria.fr"; x-sender="Xavier.Leroy@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp1-g21.free.fr) identity=helo; client-ip=212.27.42.1; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Xavier.Leroy@inria.fr"; x-sender="postmaster@smtp1-g21.free.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgIBAJ1ML1LUGyoBlGdsb2JhbABbxlCBJRYOAQEBAQcNCQkUAyWCJQEBBAFTJQEFCwshFg8JAwIBAgFFEwEFAgEBh3gKwCmPWwcWhAcDl3aGL45e X-IPAS-Result: AgIBAJ1ML1LUGyoBlGdsb2JhbABbxlCBJRYOAQEBAQcNCQkUAyWCJQEBBAFTJQEFCwshFg8JAwIBAgFFEwEFAgEBh3gKwCmPWwcWhAcDl3aGL45e X-IronPort-AV: E=Sophos;i="4.90,879,1371074400"; d="scan'208";a="32312667" Received: from smtp1-g21.free.fr ([212.27.42.1]) by mail2-smtp-roc.national.inria.fr with ESMTP; 10 Sep 2013 18:46:39 +0200 Received: from [192.168.1.2] (unknown [82.237.71.191]) by smtp1-g21.free.fr (Postfix) with ESMTP id 3DA4294019D; Tue, 10 Sep 2013 18:46:32 +0200 (CEST) Message-ID: <522F4CE3.5040507@inria.fr> Date: Tue, 10 Sep 2013 18:46:27 +0200 From: Xavier Leroy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: oleg@okmij.org CC: adrien@notk.org, caml-list@inria.fr References: <20130910020157.41613.qmail@www1.g3.pair.com> In-Reply-To: <20130910020157.41613.qmail@www1.g3.pair.com> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Accelerating compilation On 10/09/13 04:01, oleg@okmij.org wrote: > So, the real problem to me is ocamlc using RTLD_NOW flag when loading > shared library. Removing the flag would make linking faster, and less > painful. Sounds reasonable. I can give it a try later, but if anyone feels like experimenting, please share your findings. For the record, the intent of this dynamic loading is to check *at link-time* that dynamically-loaded stubs provide all the external C functions needed by the OCaml bytecode program. (As opposed to failing when the bytecode program is started.) In other words, to detect this problem as early as if one was doing "ocamlc -custom". Adrian Nader adds: > That completely breaks for cross-compilation. No matter how hard you > try, you're going to have troubles loading a PE32 shared library from > your ELF executable (and even more if you try to load AArch64 on > MIPS). Don't worry, it's only for bytecode. Bytecode executables are already portable across platforms, so no special cross-compilation support is needed. For native code, ocamlopt links C stub libraries statically, delegating the job to the (cross-)linker. - Xavier Leroy