This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dynamic Loading of Class Implementation at Runtime
- To: egcs at cygnus dot com
- Subject: Re: Dynamic Loading of Class Implementation at Runtime
- From: Martin Reinecke <martin at mpa-garching dot mpg dot de>
- Date: Fri, 11 Dec 1998 09:13:23 +0100
- Organization: Max-Planck-Institut fuer Astrophysik
Hi!
Some time ago, I have written a short piece of code which does exactly
what Joe Buck described. (I didn't know anything about
Ptolemy, though). The fine thing about the
method is that no call to dlsym() is needed. I have attached a short example
of this technique, which works on linux-i586-gnulibc1 with egcs-1.0.3
(and maybe later) and binutils 2.9.1. Alternatively, you can get the code
at http://www.mpa-garching.mpg.de/~martin/dlc.tar.gz.
I'd really like to know how portable that sort of code is. I suspect porting
should be fairly easy to other ELF platforms, but I don't know about other
platforms and have no means to test it.
If it *is* portable, this would be the easiest method to dynamically load
classes at runtime, IMHO.
Any feedback is greatly welcome.
Martin Reinecke (martin@mpa-garching.mpg.de)
P.S: Please CC to me, since I'm not on the list.
dlc.tar.gz