[comp.sys.next] Dynamic Loading of Object Files

gessel@carthage.cs.swarthmore.edu (Daniel Mark Gessel) (11/21/90)

Since 2.0 seems to be shipping now, It is time to ask this question.

Does anybody know about loading up classes dynamically?

I know IB uses it, and I'm under the impression that 2.0 will have facilities
to do so in general.

I'm also interested in loading other kinds of object files dynamically, so that
functions could be compiled and linked into a running program.

My impression is that all this is done at the Mach level.

Any info/pointers to documentation etc would be helpful.


Dan

--
Daniel Mark Gessel                          Independent Software Consultant
Internet: gessel@cs.swarthmore.edu                   and Developer
I do not represent Swarthmore College (thank God).

grd@cm-next-9.Stanford.EDU (glen diener) (11/21/90)

In article <GESSEL.90Nov20115427@carthage.cs.swarthmore.edu> gessel@carthage.cs.swarthmore.edu (Daniel Mark Gessel) writes:
>Since 2.0 seems to be shipping now, It is time to ask this question.
>
>Does anybody know about loading up classes dynamically?
>  ...etc...

According to the man pages of a prelim 2.0 demo, there is
a set of functions, rld_load, rld_unload, etc. etc. that
link edit and load object files into a running program.
Presumably, they can be used as the basis for loading
classes dynamically: we'll find out soon enough!

glen diener
grd@ccrma.stanford.edu

moose@svc.portal.com (11/22/90)

In article <GESSEL.90Nov20115427@carthage.cs.swarthmore.edu> gessel@carthage.cs.swarthmore.edu (Daniel Mark Gessel) writes:
>Since 2.0 seems to be shipping now, It is time to ask this question.
>
>Does anybody know about loading up classes dynamically?
>
>
>I'm also interested in loading other kinds of object files dynamically, so that
>functions could be compiled and linked into a running program.
>
>My impression is that all this is done at the Mach level.


Don't do it at the Mach level.  You'll be sorry.  If you absolutely want to do
it, you can use the rld commands.  But then you cannot load any objects, just
new functions.

You should use the new NeXT functions objc_loadModules. Here, you will be able
to load in complete objects and all of their methods.  


-- 
Michael Rutman				|	moose@svc.portal.com
Cubist					|	makes me a NeXT programmer
Software Ventures			|	For Your Eyes Only Public Key