Ideas and questions about dynamic linking
Howard B. Golden
hgolden at socal.rr.com
Wed Dec 23 03:43:51 EST 2009
I've been thinking about the dynamic linking proposal and I have some
ideas and questions. I am trying to clarify (in my mind) the
requirements / like-to-haves.
Q1. Is LGPL code acceptable? If so, you might want to consider gmodule
from glib (see http://library.gnome.org/devel/glib/unstable/glib-
Dynamic-Loading-of-Modules). According to their documentation, they've
already done all the work to make dynamic linking work on many
platforms.
Q2. How is dynamic linking related to GHCi interpretation? Will it ever
be necessary to be able to link dynamically _to_ interpreted code
objects? (Linking _from_ interpreted code shouldn't be a problem.)
Q3. Would it be acceptable to require compilation with PIC and the use
of the system linker to turn modules into shared objects in order to use
dynamic linking? Is it necessary for GHCi to be able to load .o files
directly?
Q4. Currently the Haskell linker (rts/Linker.c) maintains a symbol
table. Why is this necessary? What would happen if the Haskell code
called the system's symbol lookup (e.g., dlsym on POSIX or
g_module_symbol from gmodule)?
Q5. Are there any platforms that GHCi runs on that don't support shared
libraries and dynamic linking?
Thanks,
Howard
More information about the Cvs-ghc
mailing list