This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Dynamic Loading of Class Implementation at Runtime


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]