Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Stéphane Glondu" <steph@glondu.net>
To: Jason Noakes <jjnoakes@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Reading external references from cmo/cmx files
Date: Sat, 04 Oct 2008 22:41:56 +0200	[thread overview]
Message-ID: <48E7D514.4070502@glondu.net> (raw)
In-Reply-To: <2738.192.168.2.3.1223151615.squirrel@192.168.2.5>

Jason Noakes wrote:
> Are there any tools or examples that would allow me to take a .cmo or .cmx
> file and produce a list of the external modules that are referenced from
> that file?

There is ocamlobjinfo. But it seems to work only with bytecode objects
(.cmo/.cma).

> If I could just read a list of external module references out of a .cmo
> file I could topologically sort them on my own (or error out if there is a
> cycle).

You can use ocamlobjinfo on bytecode objects to get your sorted list.
The same order will likely work with native code objects.


Cheers,

-- 
Stéphane



  parent reply	other threads:[~2008-10-04 20:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-04 20:20 Jason Noakes
2008-10-04 20:39 ` [Caml-list] " David Teller
2008-10-04 20:41 ` Stéphane Glondu [this message]
2008-10-05  7:51   ` Stefano Zacchiroli
2008-10-05  8:12     ` Re : " Adrien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48E7D514.4070502@glondu.net \
    --to=steph@glondu.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=jjnoakes@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox