From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 1ED19BC69 for ; Fri, 4 Jan 2008 17:58:29 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAGb0fUfUGyokimdsb2JhbACQEAIBCAIIIgeaQg X-IronPort-AV: E=Sophos;i="4.24,245,1196636400"; d="scan'208";a="5727347" Received: from smtp6-g19.free.fr ([212.27.42.36]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Jan 2008 17:58:29 +0100 Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id C82E15FEE2; Fri, 4 Jan 2008 17:58:28 +0100 (CET) Received: from [192.168.1.3] (che78-2-82-237-71-191.fbx.proxad.net [82.237.71.191]) by smtp6-g19.free.fr (Postfix) with ESMTP id 89CCD5FE88; Fri, 4 Jan 2008 17:58:28 +0100 (CET) Message-ID: <477E65B4.30609@inria.fr> Date: Fri, 04 Jan 2008 17:58:28 +0100 From: Xavier Leroy User-Agent: Thunderbird 2.0.0.4 (X11/20070620) MIME-Version: 1.0 To: David LONY Cc: Alain Frisch , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Interface between Ocaml and Assembler References: <477DFF6C.1070409@pragmadev.com> <477DFFC7.8@frisch.fr> <477E62C1.8060301@pragmadev.com> In-Reply-To: <477E62C1.8060301@pragmadev.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 ocaml:01 usr:01 lib:01 -lm:01 -ldl:01 usr:01 lib:01 libasmrun:01 gcc:01 ints:01 caml-list:01 undefined:01 int:01 caml:02 > But it will be easier to make a "bridge" like this one : "asm code" -> > "C code"->"Ocaml code" ? Yes, very much easier. > ld -o test gas.o test.o truc_main.o -L/usr/lib/ocaml/3.09.2/ -lasmrun > -lm -ldl > > /usr/lib/ocaml/3.09.2//libasmrun.a(ints.o): In function > `caml_int64_of_string': > (.text+0xb4b): undefined reference to `__udivdi3' > > Does anyone has a solution ? Use "gcc" instead of "ld" for the final linking step. - Xavier Leroy