From owner-freebsd-current Thu May 14 00:40:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA28122 for freebsd-current-outgoing; Thu, 14 May 1998 00:40:10 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA28020 for ; Thu, 14 May 1998 00:40:02 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.8.8/8.8.7) id RAA25017; Thu, 14 May 1998 17:42:31 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199805140742.RAA25017@cimlogic.com.au> Subject: Re: dlopen again In-Reply-To: <199805140636.XAA22124@usr05.primenet.com> from Terry Lambert at "May 14, 98 06:36:52 am" To: tlambert@primenet.com (Terry Lambert) Date: Thu, 14 May 1998 17:42:30 +1000 (EST) Cc: jb@cimlogic.com.au, tlambert@primenet.com, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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