caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Module dependencies of bytecode executables
@ 2006-09-21  7:39 Samuel Mimram
  2006-09-21  9:26 ` [Caml-list] " Xavier Leroy
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Mimram @ 2006-09-21  7:39 UTC (permalink / raw)
  To: Caml List; +Cc: Julien Cristau, Stefano Zacchiroli

Hi list,

Is it somehow possible to extract the list of modules used by a bytecode
executable? "ocamldumpobj a.out | grep SETGLOBAL" seems to be a good
starting point but I don't know if it's reliable. Are the md5sums of the
imported interfaces still available?

Also, how can I determine which *.so will be dlopened by the executable?

Thanks!

Cheers,

Samuel.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Module dependencies of bytecode executables
  2006-09-21  7:39 Module dependencies of bytecode executables Samuel Mimram
@ 2006-09-21  9:26 ` Xavier Leroy
  2006-09-21 10:08   ` Stefano Zacchiroli
  0 siblings, 1 reply; 3+ messages in thread
From: Xavier Leroy @ 2006-09-21  9:26 UTC (permalink / raw)
  To: Samuel Mimram; +Cc: Caml List, Julien Cristau, Stefano Zacchiroli

> Is it somehow possible to extract the list of modules used by a bytecode
> executable? "ocamldumpobj a.out | grep SETGLOBAL" seems to be a good
> starting point but I don't know if it's reliable.

It is reliable.

> Are the md5sums of the imported interfaces still available?

Yes, these are saved in the bytecode executable, section "CRCS",
but there are no tools in the distrib that will list this info for you.

> Also, how can I determine which *.so will be dlopened by the executable?

Run the executable with OCAMLRUNPARAM=v=256, this will print debug
messages during shared library loading, including names and
locations of these libraries.

- Xavier Leroy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Module dependencies of bytecode executables
  2006-09-21  9:26 ` [Caml-list] " Xavier Leroy
@ 2006-09-21 10:08   ` Stefano Zacchiroli
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Zacchiroli @ 2006-09-21 10:08 UTC (permalink / raw)
  To: Caml List; +Cc: Samuel Mimram, Julien Cristau

On Thu, Sep 21, 2006 at 11:26:11AM +0200, Xavier Leroy wrote:
> > Are the md5sums of the imported interfaces still available?
> Yes, these are saved in the bytecode executable, section "CRCS",
> but there are no tools in the distrib that will list this info for you.

Any pointer to where to look in the code to write such a tool, or some
alternative hack?

> > Also, how can I determine which *.so will be dlopened by the executable?
> Run the executable with OCAMLRUNPARAM=v=256, this will print debug
> messages during shared library loading, including names and
> locations of these libraries.

That's bad, we were hoping to extract the information statically,
without having to run the executable. As above, any pointer?

The rationale for all of this is that we are trying to come up with a
mechanism for automatically compute (tight) dependencies among debian
packages on the basis of the information stored inside bytecode
executables and objects.

Many thanks for your answer.

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-21 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-21  7:39 Module dependencies of bytecode executables Samuel Mimram
2006-09-21  9:26 ` [Caml-list] " Xavier Leroy
2006-09-21 10:08   ` Stefano Zacchiroli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).