|Dynamic compilation/linking email@example.com (Steve Boswell) (1991-12-05)|
|Re: Dynamic compilation/linking oliver@madrone.CS.Berkeley.EDU (1991-12-07)|
|Re: Dynamic compilation/linking firstname.lastname@example.org (1991-12-10)|
|Re: Dynamic compilation/linking email@example.com (Marc Sabatella) (1991-12-11)|
|Re: Dynamic compilation/linking firstname.lastname@example.org (1991-12-12)|
|Re: Dynamic compilation/linking email@example.com (1991-12-13)|
|Re: Dynamic compilation/linking firstname.lastname@example.org (1991-12-17)|
|From:||email@example.com (David Keppel)|
|Organization:||Computer Science & Engineering, U. of Washington, Seattle|
|Date:||Thu, 12 Dec 91 21:00:50 GMT|
Steve Boswell <firstname.lastname@example.org> 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
Search the comp.compilers archives again.