Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!hpfcso!mjs From: mjs@hpfcso.FC.HP.COM (Marc Sabatella) Newsgroups: comp.sys.atari.st Subject: Re: What's the BEST CLI for the ST Message-ID: <7340098@hpfcso.FC.HP.COM> Date: 15 Mar 91 22:15:40 GMT References: <170@gem.stack.urc.tue.nl> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 26 >This would be nice but why doesn't someone take a standard ansi C library >and make a shareable version taht can be loaded at boot time and there >after used ( Via a trap for example ) then with the appropriate binding >the text size of executable could be reduced by the size of the linked >library. How about a coff loader for TOS and dynamic linking :-) This could actually be done fairly easily; the main issue is what to do with program references to library data. You would have to either change all the compilers to make such references indirectly, or make the linker smart enough to copy the data (like errno) into your program, and have the runtime system smart enough so that the shared C library can reference data in your program. The latter is nontrivial. Also note that the libraries needn't be loaded at boot time; the startup code for the program could load libraries as appropriate, thus allowing arbitrary libraries to be shared on demand. As for static data in shared libraries, that is usually implemented in Unix implementations by the same "copy-on-write" mechanism used by fork() for program data segments. -------------- Marc Sabatella (marc@hpmonk.fc.hp.com) Disclaimers: 2 + 2 = 3, for suitably small values of 2 Bill and Dave may not always agree with me