[comp.sys.sgi] Question on Dynamically Loading Routines

dahl@netcom.UUCP (Michael Dahl) (12/18/90)

We are currently working on a way to dynamically load modified
routines into a very large program (30Mb executable) in a CAD/CAM
application.

The current plan is to have the program allocate a section of memory
for the routine to be dynamically loaded.  Then using the address
just allocated, call the linker and have it link the routine at that
address.  The program would then read the newly linked routine into
memory.

We want to automate this process, so we tried to have our program
fork the linker, but we are getting an error 11 (probably ran out of
memory or swap space) when it tries to fork.  So, it looks like we
will need to have a daemon running that we can send a message to
to perform the link.

All routines currently call each other through an address table, so
once we get the new routine into memory, we can change the pointer
in the address table to start using the new version of the routine.

This is getting rather complicated, and I was wondering if anyone
knows of an easier way to do this, or if there is a reason we have
overlooked why this will not work?

Any help would be greatly appreciated.

-- 
Michael Dahl,  Cimplex Corporation  
Voice: (408) 879-2800  Fax: (408) 879-9605
1500 E. Hamilton Ave. Suite 100,  Campbell Ca. 95008 
dahl@netcom.uucp  - or -  {apple,claris}!netcom!dahl