Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!kithrup!sef From: sef@kithrup.COM (Sean Eric Fagan) Newsgroups: comp.unix.internals Subject: Re: Shared libraries are not necessary Keywords: ISC i386 shared libraries Message-ID: <1991May16.083123.26599@kithrup.COM> Date: 16 May 91 08:31:23 GMT References: <184@titccy.cc.titech.ac.jp> <1991May16.002617.15386@ladc.bull.com> <196@titccy.cc.titech.ac.jp> Organization: Kithrup Enterprises, Ltd. Lines: 49 In article <196@titccy.cc.titech.ac.jp> mohta@necom830.cc.titech.ac.jp (Masataka Ohta) writes: >I have already proved that > 1) its space saving is negligible It is *not* negligible. It can easily amount to *many* megabytes, with X11, toolkits, and the like. *Each* X application gets many, many Kbytes' worth of code; putting this in a shared library greatly reduces amount of disk space. On a SparcStation 2, in /usr/bin/X11, xterm in dynamically linked, xtex isn't. xterm is about 180k, xtex is 590k. A version of emacs 19 is statically linked, and is over 3MBytes. A program I found called 'xgif'. Static-linked is 270k; a dynamic-linked version (same compiler, just let it use dynamic linking, which was the default) 73k. size says: text data bss dec hex 155648 49152 47376 252176 3d910 xgif 24576 8192 36552 69320 10ec8 xgif.dynalink Let's see... that's a savings of 131072 bytes in text alone, not counting the data. Now, let's be conservative, and say that you have only about, say, a dozen X applications on your system (the X server, xterm, xclock, xbiff, xgif, xtrek, a few programs you've grabbed and compiled). Using shared libraries is a savings of 1572864 bytes. That's 1.5Mbytes. Taking up disk space all of the time, whether the programs are in use or not. That is a *very* conservative estimate. I don't know about you, but I have *definitely* been on systems where even an extra 1Mbyte would have saved a lot of hassle and pain. > 2) shared libraries dose not help software version up > from /etc/hosts to DNS Please tell that to all of the Sun sites who upgrade to using a nameserver simply by installing *one new file* (the shared library). But I forgot: you don't accept the fact that people can code to use the new structures and still use /etc/hosts. -- Sean Eric Fagan | "I made the universe, but please don't blame me for it; sef@kithrup.COM | I had a bellyache at the time." -----------------+ -- The Turtle (Stephen King, _It_) Any opinions expressed are my own, and generally unpopular with others.