From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 2EDD27F890 for ; Fri, 28 Mar 2014 12:59:23 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jfc@MIT.EDU) identity=pra; client-ip=18.9.25.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jfc@mit.edu"; x-sender="jfc@MIT.EDU"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of jfc@mit.edu designates 18.9.25.12 as permitted sender) identity=mailfrom; client-ip=18.9.25.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jfc@mit.edu"; x-sender="jfc@mit.edu"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@dmz-mailsec-scanner-1.mit.edu) identity=helo; client-ip=18.9.25.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jfc@mit.edu"; x-sender="postmaster@dmz-mailsec-scanner-1.mit.edu"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8BAJVjNVMSCRkMnGdsb2JhbABZg0GsVJZwgRoWDgEBAQEBCAsJCRQogiUBAQEDAW4LEAshBCEPNhIGJYdTAwkLCsokA2GGWBeOeweDJIEUBJoAiSmJSoFb X-IPAS-Result: Av8BAJVjNVMSCRkMnGdsb2JhbABZg0GsVJZwgRoWDgEBAQEBCAsJCRQogiUBAQEDAW4LEAshBCEPNhIGJYdTAwkLCsokA2GGWBeOeweDJIEUBJoAiSmJSoFb X-IronPort-AV: E=Sophos;i="4.97,750,1389740400"; d="scan'208";a="65172698" Received: from dmz-mailsec-scanner-1.mit.edu ([18.9.25.12]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 28 Mar 2014 12:59:22 +0100 X-AuditID: 1209190c-f794a6d000000c27-bb-53356418c78a Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id E7.A2.03111.81465335; Fri, 28 Mar 2014 07:59:20 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id s2SBxJGU028088; Fri, 28 Mar 2014 07:59:20 -0400 Received: from localhost (contents-vnder-pressvre.mit.edu [18.9.64.11]) (authenticated bits=0) (User authenticated as jfc@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s2SBxI0E022524; Fri, 28 Mar 2014 07:59:18 -0400 Message-Id: <201403281159.s2SBxI0E022524@outgoing.mit.edu> To: Normand cc: caml-list@inria.fr In-reply-to: <5335584E.5080908@linux.vnet.ibm.com> References: <532B0EFD.9070606@linux.vnet.ibm.com> <20140322122400.GD10374@annexia.org> <5335584E.5080908@linux.vnet.ibm.com> Comments: In-reply-to Normand message dated "Fri, 28 Mar 2014 12:09:02 +0100." X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.3.1 Date: Fri, 28 Mar 2014 07:59:18 -0400 From: John Carr X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBIsWRmVeSWpSXmKPExsUixCmqrCuRYhpssPSpvsWnHRtYLDoPHmZ2 YPKY9OIQi8eDQ5tZApiiuGxSUnMyy1KL9O0SuDL+/mpkKrjCU9F70bOBcStXFyMnh4SAicTc LwfYIWwxiQv31rN1MXJxCAnMZpLoerubHcLZyCixad9OqMwvRokLx3tZQFp4Bawkrn2czghi iwhoSCy8PJ8NxGYGGvXq4QOwscICKRJL21rA4pwCRhL3f04HiwsJ1Ej8uvOVHaI+X2L1oS5m iDN0Jf7tXwM2n0VAVeLku21gvWwCshKP2rsYJzDyL2BkWMUom5JbpZubmJlTnJqsW5ycmJeX WqRrqJebWaKXmlK6iREcSJI8OxjfHFQ6xCjAwajEwzvDyiRYiDWxrLgy9xCjJAeTkijv9TjT YCG+pPyUyozE4oz4otKc1OJDjBIczEoivEtsgXK8KYmVValF+TApaQ4WJXFeeQ7tYCGB9MSS 1OzU1ILUIpisDAeHkgTvkySgRsGi1PTUirTMnBKENBMHJ8hwHqDh7SA1vMUFibnFmekQ+VOM uhz/unu6GIVY8vLzUqXEeU8kAhUJgBRllObBzYElgFeM4kBvCfOeBBnFA0wecJNeAS1hAlrC VWUEsqQkESEl1cDYH/9oydYX+T3PYmR1ehf8DSv7uqfw3UtDqV72jTPLTl3Sk3e42ZukMKFC 2fPSsnuGzRXNazsvFnBGHPv2VUDg7D+3uWsOn2zmOH785vqlOxSm775huMYyJeh/ZGNfpkVP bwNbf4TKVT7upa/tVrQaqbcee2AfVaHtdKX8tVWHfFLjgb0zj6UosRRnJBpqMRcVJwIAlZ2P v9sCAAA= Subject: Re: [Caml-list] Where is defined the caml_program initial entry point called from asmrun/*/ The result of an ocaml program is the side effect of loading (initializing) all modules. Cmmgen.entry_point generates a function called caml_program that runs the module initializer functions of everything you link. If you need to see the exact assembly code you can use -S to save the assembly file with this generated function. It may be in /tmp. Make sure you understand asmrun/stack.h, which defines part of the binary interface between compiler and runtime and between runtime C and assembly code. If the definitions don't match your program may crash when it throws an exception or garbage collects. > > I still have problems while porting ocaml on ppc64le archi. I was able to generate the ocamlcompopt, but obviously with missing changes because the first trial is segfault. > > Investigating the failure with gdb I was able to trace the code from "caml_start_program" calling "caml_program" > https://git.fedorahosted.org/cgit/fedora-ocaml.git/tree/asmrun/power64-elf.S#n350 > (url without my own patches) > > But I am not able to find the source code associated to the "caml_program" > > Could somebody give me a clue ? I guess this is generated with help of asmcomp/*/emit.mlp > and may be the asmcomp/cmmgen.ml but the generated asmcom/cmmgen.s do not match the disassemble code displayed via gdb. > > > -- > Michel Normand > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs