Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!milano!cadillac!puma!vaughan From: vaughan@puma.cad.mcc.com (Paul Vaughan) Newsgroups: comp.lang.c++ Subject: dynamic linking Message-ID: <2425@cadillac.CAD.MCC.COM> Date: 18 Aug 89 20:46:25 GMT Sender: news@cadillac.CAD.MCC.COM Lines: 34 I have some questions about dynamic linking and c++ Who is doing it? What are you using to do it? What are you using it for? What are the properties of your technique? Example: We're trying to use dynamic linking to enable users to add new classes (derived from old classes) into our application at runtime. At the moment we're using a program that uses a fixed symbol table initialized in source code and compiled in with the running object code to link symbols in the new code to those in the old code. It actually loads the new code (without using ld) and returns the address of the first function in the newly loaded file. It doesn't do anything about binding symbol references in the running code to definitions in the new code. At the moment, I arrange the new code files so that the first function is a constructor for a class object, use it to create new objects, and work with them via virtual functions. It doesn't add the symbols in the new code into the symbol table, so (for instance) we can't let users derive new classes from their dynamically loaded classes, or use functions that they dynamically loaded. Unfortunately, I can't post the code that does this, but I don't think anybody would want it anyway. It's not very satisfactory. Has anybody got a better solution, preferably using the standard loader? When will dynamic linking be fully supported by FSF (or ATT, or . . .)? If I get any interest, I'll post a summary to the net. Paul Vaughan, MCC CAD Program | ARPA: vaughan@mcc.com | Phone: [512] 338-3639 Box 200195, Austin, TX 78720 | UUCP: ...!cs.utexas.edu!milano!cadillac!vaughan