Handrolled linker?

David Brown haskell at davidb.org
Mon Jun 14 15:07:14 EDT 2004


On Mon, Jun 14, 2004 at 05:03:20PM +0100, Simon Marlow wrote:

> > Actually, this isn't the question that I have.  This is about ghci's
> > dynamic loading of C objects (or other similar language).  There is a
> > handrolled linker in the ghci code.  I'm interested in replacing this
> > handrolled linker with dlopen... so that it is easier to port.
> 
> This might work... if the dynamic linker supports doing "ordinary"
> static-style linking.  I've been meaning to try this on Linux.

dlopen will load pretty much any elf object file.  There is little
special about shared libraries in Linux.  The position-independent code
only localizes the changes that need to be made on link, so that more
pages can be shared.  Libraries work just fine without it.

But, as someone pointed out, some of these files contain haskell code,
and I'll have to look more into whether or not that will work.

Dave


More information about the Glasgow-haskell-users mailing list