Dynamic loading and building of shared libraries

From: STARYNKEVITCH Basile (Basile.Starynkevitch@cea.fr)
Date: Mon Jan 17 2000 - 09:00:18 MET

  • Next message: Xavier Leroy: "Re: Stdout"

    >>>>> "skaller" == skaller <skaller@maxtal.com.au> writes:

        skaller> I have a need to load sets of ocaml functions at run time
        skaller> in Viper using dlopen [...]

        skaller> At the moment, these functions must be statically linked
        skaller> into the interpreter, which is not really acceptable.

        skaller> It should be easy to provide a C factory function in a
        skaller> shared library that returns a table of functions: my
        skaller> question is, how to tell ocaml to link a shared library,
        skaller> rather than a main executable.

        skaller> How do I do this? If not, can a way be devised to tell
        skaller> ocamlopt to do it? Or is there a reasone it isn't
        skaller> possible?

    Dynamically loaded shared objects are usually made with position
    independent code. This requires that the ocamlopt code generator
    follows some (perhaps tricky) coding conventions (which might also
    require some changes in the runtime GC system)

    I agree with John Skaller that dynamic library support in ocamlopt
    would be nice.

    Regards

    N.B. Any opinions expressed here are only mine, and not of my organization.
    N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.

    ---------------------------------------------------------------------
    Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique
    DTA/LETI/DEIN/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX * France
    phone: 1,69.08.60.55; fax: 1.69.08.83.95 home: 1,46.65.45.53
    email: Basile point Starynkevitch at cea point fr



    This archive was generated by hypermail 2b29 : Mon Jan 17 2000 - 11:40:04 MET