Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 1998 17:42:30 +1000 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        tlambert@primenet.com (Terry Lambert)
Cc:        jb@cimlogic.com.au, tlambert@primenet.com, current@FreeBSD.ORG
Subject:   Re: dlopen again
Message-ID:  <199805140742.RAA25017@cimlogic.com.au>
In-Reply-To: <199805140636.XAA22124@usr05.primenet.com> from Terry Lambert at "May 14, 98 06:36:52 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> What are the current obstacles to having a dlopen that works in
> statically linked code?

[I'm not sure I'm the best person to answer this. Didn't you mean jdp?
 He's the ELF and shared loader guru. 8-)]

I've got a control system process for manufacturing (that executes PLC
code) which does this, albeit not structured in the general way I think
you are referring to. The application is threaded and it is linked with
some shared libraries and the rest are statically linked. The application
has a compiler thread that parses the source and assembles it to machine
code, mmaps memory as executable and calls the function as a thread.
In the process of assembling the code it resolves dynamic references
to functions already linked in and to other functions already compiled
and mapped as executable (i.e. shared between threads). It doesn't matter
whether these are in static libraries or shared ones since this application
is custom and it pre-compiles in a global array of addresses that the run-time
compiler thread uses so that it doesn't need to know anything about
the binary format.

-- 
John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805140742.RAA25017>