questions on dynamic linking on SunOS

Nathaniel Ingersoll natei at sco.COM
Sat Sep 16 03:49:22 AEST 1989


In article <NIEH.89Sep14164443 at nnn.crd.ge.com> nieh at nnn.crd.ge.com writes:
:
:
:This idea just came across to my mind. If it is feasible it would be
:very useful. Before I even try it I would like to get some opinions.
:
:On SunOS 4.0, 
:
: 1. run a C program which generates a C function, say xxx(...). 
: 2. fork a cc to compile it and to put it into the shareable  library.
: 3. back to the program and call it. (I think it's ok)
: 4. generate a different version of  xxx(...) 
:    and compile it and put it back to the  same shareable library.
: 5. call it again. (what should happen? the old xxx(...)
:                        or the new xxx(...) gets executed ?)
:
:Any comments ?

This wouldn't work because you wouldn't be able to write to the shared
library that your program includes, because it's currently loaded
in memory (sort of like "Text file busy").  An analogy would be
writing to the text file of your program and having that
modify the data/text of your running program, which also doesn't work.



More information about the Comp.unix.wizards mailing list