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) |
Newsgroups: | comp.compilers |
From: | pardo@cs.washington.edu (David Keppel) |
Keywords: | linker |
Organization: | Computer Science & Engineering, U. of Washington, Seattle |
References: | 91-12-031 |
Date: | Thu, 12 Dec 91 21:00:50 GMT |
Steve Boswell <whatis@ucsd.edu> writes:
>[Compile to C, then compile and dynamically-link C.
> Can this be done portably?]
The moderator (John Levine) writes:
>[No, but there may be things that can be ported easily.]
Many LISP systems (e.g., KCL) do what you want. So if you can find a LISP
that works on all of your target platforms, you're in business. See also
the GNU dynamic linker `dld' and the man pages for `ld' for Your Favorite
System(tm). Problems you're likely to find are:
* There are differnt models for linking.
* Some systems prohibit dynamic linking (only a few).
* Some tools are broken.
Note also that dynamic linking can be divided in to various phases:
modifying the object code for its final placement in the address space,
modifying other parts of the address space (e.g., if you're installing
|_printf| dynamically, you generally need to rebind all sites that call
|_printf|). So e.g., `ld' will relocate an object, but it's up to you to
update all call sites for that object.
Be careful, also, that the compile/link cycle is usually slow enough that
it's a performance problem for interactive systems if e.g., each line
entered by the user is compiled and linked using the standard tool.
My own contribution here is _A Portable Interface for On-The-Fly
Instruction Space Modifciation_, Proceedings of ASPLOS-IV, 1991. The
paper describes a portable interface for managing I-cache coherency, but
assumes the existance of a dynamic linker for doing relocation.
;-D on ( Enteractive ) Pardo
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.