public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Dynamic Loading of Class Implementation at Runtime.
@ 1998-12-10 11:15 Daniel Berlin
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Berlin @ 1998-12-10 11:15 UTC (permalink / raw)
  To: 'Mumit Khan', 'EGCS Development Group'

> 
> You should be able to get the mangling algorithm for most vendor
> compilers, with the exception of perhaps the windows-based ones. I've
> tried in vain to get this info out of Microsoft.

I reverse engineered it, and never got around to sending you the doc i wrote
up on it (sorry bout that).
Then BeOS moved to ELF/DWARF2, so i had no need for demangling the stupid
names in the broken codeview i had to deal with originally to get gdb going
on BeOS.
I still have it around somewhere if you want it.
It's fairly easy to understand.
If you want official docs, well, can't. I wouldn't even know where to look.
Metrowerks uses the same algorithm for their windows compilers, but i don't
know if you'd have better luck with them.

--Dan
> 
> Regards,
> Mumit
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Dynamic Loading of Class Implementation at Runtime
@ 1998-12-11  0:13 Martin Reinecke
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Reinecke @ 1998-12-11  0:13 UTC (permalink / raw)
  To: egcs

[-- Attachment #1: Type: text/plain, Size: 885 bytes --]

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


[-- Attachment #2: dlc.tar.gz --]
[-- Type: application/x-gzip, Size: 2068 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Dynamic Loading of Class Implementation at Runtime.
@ 1998-12-10 11:05 Mike Stump
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Stump @ 1998-12-10 11:05 UTC (permalink / raw)
  To: rssh; +Cc: egcs, scherrey

> From: Alexandre Oliva <oliva@dcc.unicamp.br>
> Date: 10 Dec 1998 14:41:10 -0200

> I think the only portable solution is to define wrappers with "C"
> linkage for interfacing with the library.

Well, to be more constructive than this, why don't you design an
access system to get at the information you want and need, and
document it, and post it here.  In time, maybe someone will implement
it.  Without such a document, the chances are even lower it will ever
be done.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Dynamic Loading of Class Implementation at Runtime.
@ 1998-12-09 22:21 Benjamin Scherrey
  1998-12-10  7:00 ` Alexandre Oliva
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Benjamin Scherrey @ 1998-12-09 22:21 UTC (permalink / raw)
  To: EGCS Development Group

    I've seen messages in the past that allude to this subject and I've
searched long and hard for a (somewhat) platform independent mechanism
to implement this feature but with no success. So... I'm in need of
information on how to load, at runtime, from a shared library, the
implementation of a class (or its subclass) and then be able to unload
it and load a new implementation.

    This requires the ability to resolve virtual and non-virtual member
functions and not just C-type functions which is what has been the big
problem. My platforms of interest are x86/Linux, SPARC/Solaris 2.6, and
HP9000/HP/Ux. This is using egcs1.1.1 G++ and later as they come
available. I understand that different OS's will likely have different
calls to get at the shared libraries but my main point of interest is
the resolution of these mangled symbols at runtime.

    Appreciate all pointers and information,

        Ben Scherrey

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1998-12-12  1:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-10 11:15 Dynamic Loading of Class Implementation at Runtime Daniel Berlin
  -- strict thread matches above, loose matches on Subject: below --
1998-12-11  0:13 Martin Reinecke
1998-12-10 11:05 Mike Stump
1998-12-09 22:21 Benjamin Scherrey
1998-12-10  7:00 ` Alexandre Oliva
1998-12-10  7:12   ` Ruslan Shevchenko
1998-12-10  8:44     ` Alexandre Oliva
1998-12-10  9:36       ` Mumit Khan
1998-12-12  1:30   ` Martin von Loewis
1998-12-10 14:06 ` Marat Boshernitsan
1998-12-10 15:01 ` Joe Buck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).