Re: Dynamic compilation/linking

tbn@csd.cri.dk (Torben Bang Nielsen)
13 Dec 91 15:09:11 GMT

          From comp.compilers

Related articles
Dynamic compilation/linking whatis@ucsd.edu (Steve Boswell) (1991-12-05)
Re: Dynamic compilation/linking oliver@madrone.CS.Berkeley.EDU (1991-12-07)
Re: Dynamic compilation/linking fkittred@bbn.com (1991-12-10)
Re: Dynamic compilation/linking mjs@hpmonk.fc.hp.com (Marc Sabatella) (1991-12-11)
Re: Dynamic compilation/linking pardo@cs.washington.edu (1991-12-12)
Re: Dynamic compilation/linking tbn@csd.cri.dk (1991-12-13)
Re: Dynamic compilation/linking parag@netcom.com (1991-12-17)
| List of all articles for this month |
Newsgroups: comp.compilers
From: tbn@csd.cri.dk (Torben Bang Nielsen)
Keywords: linking, experiment
Organization: Computer Resources International A/S
References: 91-12-031
Date: 13 Dec 91 15:09:11 GMT

whatis@ucsd.edu (Steve Boswell) writes:


>I'm currently working on an extendible compiler, so I can experiment with
>different language ideas. It's based on C, for its low-level abilities.
>I'd like to compile a given piece of code into machine code and have it in
>some buffer in memory, then call it. Additionally I'd like to be able to
>read code in from disk and run it.


I've been looking around in the man-pages on our SunOs 4.1 system for any
information on this subject. Well burried in section 3, without many
references to it, four functions are mentioned: dlopen, dlclose, dlerror
and dlsym. These function should apparantly be a simple interface to
dynamically loading object files. However I haven't been able to get my
example to run, I suspect it has something to do with my inability to get
'ld' run on the file with a '-A' option. Have anybody had any experiences
with theese functions and 'ld'?


Torben Bang Nielsen
Copenhagen, Denmark
tbn@csd.cri.dk
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.